I have a current sensor, and I have a dimmer, I’m wanting to set the dimmer % based on the value of the current.
I’ve written the following but unable to get it to save due to the error: Message malformed: expected float for dictionary value @ data[‘brightness_pct’]
Any ideas?
alias: HWC Power
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.cs5460a_esp32_c3_power
above: 100
condition: []
action:
- type: turn_on
device_id: e4b036b2811ff39b925897fdc31eb079
entity_id: light.hwc_dimmer
domain: light
brightness_pct: "{{ sensor.cs5460a_esp32_c3_power / 35) | round(0, "floor") | float() }}"
mode: single