#I want to automatically have this entity
1 messages · Page 1 of 1 (latest)
- service: number.set_value
data:
target: number.wled_kitchen3_intensity
value: >-
{{ states('sensor.dishwasher_program_progress')|int / 100 * 255 }}
And, if you want the trigger
trigger:
- platform: state
entity_id: sensor.dishwasher_program_progress
action:
- service: number.set_value
data:
target: number.wled_kitchen3_intensity
value: >-
{{ states('sensor.dishwasher_program_progress')|int / 100 * 255 }}
thanks so much @rocky pendant - I will see if i can test it using the developer tools now
You may need to turn the template into:
{{ (states('sensor.dishwasher_program_progress')|int / 100 * 255)|round(0) }}
This is what it took:
service: number.set_value
data:
entity_id: number.wled_kitchen3_intensity
value: "{{ states('sensor.dishwasher_program_progress') | int }}"
To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
got it - thanks 😄
still need to test with the dishwasher actually running but using developer tools to edit states it seems to be working
The only thing I'd note is that the number runs from 1 to 255, and your template there runs from 1 to 100