#I want to automatically have this entity

1 messages · Page 1 of 1 (latest)

rocky pendant
#
- 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 }}
keen hound
#

thanks so much @rocky pendant - I will see if i can test it using the developer tools now

rocky pendant
#

You may need to turn the template into:

      {{ (states('sensor.dishwasher_program_progress')|int / 100 * 255)|round(0) }}
keen hound
#

This is what it took:

#
service: number.set_value
data:
  entity_id: number.wled_kitchen3_intensity
  value: "{{ states('sensor.dishwasher_program_progress') | int }}"
compact shaleBOT
#

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.

keen hound
#

got it - thanks 😄

#

still need to test with the dishwasher actually running but using developer tools to edit states it seems to be working

rocky pendant
#

The only thing I'd note is that the number runs from 1 to 255, and your template there runs from 1 to 100

keen hound
#

in WLED 1 to 100 is positive - then from 100 to 200 it goes in reverse

#

on the effect