@naamah75 wrote:
Hi folks! I don’t have a clie why this work
- id: 'pzem_004t_color' alias: PZEM-004T color initial_state: 'on' trigger: - platform: time_pattern minutes: "/1" action: - service: light.turn_on data: entity_id: light.pzem_004t brightness: 255 rgb_color: [128,0,0]
…and this didn’t …
- id: 'pzem_004t_color' alias: PZEM-004T color initial_state: 'on' trigger: - platform: time_pattern minutes: "/1" action: - service: light.turn_on data_template: entity_id: light.pzem_004t brightness: 255 rgb_color: "[{{(states('input_number.power_test') | int / 6000*255) | int }},0,0]"
Obviously I’ve tried Jinja2 model template and it works… I’ve some like [128,0,0]
Posts: 6
Participants: 2