How can I pass an input_number formatted as a percentage from ha to a DAC output on a esp32?
I’m always getting error on the compilation phase.
output:
- platform: esp32_dac
pin: GPIO26
id: dac_output
sensor:
- platform: homeassistant
name: "Percentage"
entity_id: input_number.zero_export_energy
id: zero_export_energy
on_value_range:
- above: 0
then:
output.set_level:
id: dac_output
level: !lambda 'return id(zero_export_energy);'
error:
/config/esphome/base_esp32.yaml:66:14: error: cannot convert 'esphome::homeassistant::HomeassistantSensor*' to 'float' in return
level: !lambda 'return id(zero_export_energy);'
^