Merge pull request #21 from slimcdk/main

Import `tmc2209_hub` for custom ESPHome component examples
This commit is contained in:
joshr120 2025-02-06 13:49:44 +13:00 committed by GitHub
commit a01e2e57e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
external_components: external_components:
- source: github://slimcdk/esphome-custom-components - source: github://slimcdk/esphome-custom-components
components: [tmc2209, stepper] components: [tmc2209_hub, tmc2209, stepper]
substitutions: substitutions:
encoder_closed_pos: "30000" # full blinds length (in encoder counts) !! CHANGE TO SUIT YOUR SETUP !! encoder_closed_pos: "30000" # full blinds length (in encoder counts) !! CHANGE TO SUIT YOUR SETUP !!
@ -281,4 +281,4 @@ cover:
position: !lambda return (1.0-id(pd_blinds)->position) * ${encoder_closed_pos} * ${stepper_encoder_ratio}; position: !lambda return (1.0-id(pd_blinds)->position) * ${encoder_closed_pos} * ${stepper_encoder_ratio};
- stepper.set_target: - stepper.set_target:
id: motor id: motor
target: !lambda return (1.0-pos) * ${encoder_closed_pos} * ${stepper_encoder_ratio}; target: !lambda return (1.0-pos) * ${encoder_closed_pos} * ${stepper_encoder_ratio};

View File

@ -3,7 +3,7 @@
external_components: external_components:
- source: github://slimcdk/esphome-custom-components - source: github://slimcdk/esphome-custom-components
components: [tmc2209, stepper] components: [tmc2209_hub, tmc2209, stepper]
globals: globals:
- id: encoder_tracking_ - id: encoder_tracking_
@ -215,4 +215,4 @@ number:
set_action: set_action:
- stepper.set_target: - stepper.set_target:
id: driver id: driver
target: !lambda "return x;" target: !lambda "return x;"