I’ve looked for a few hours to a solution to this.
I’ve built this circuit:
and it works fine, but as expected its inverted, i.e. daylight shows 0% and dark shows 100%.
I thought there would be an easy way to do this, but several hours later, I’ve not figured it out.
I thought it would just be a case of inserting a NOT, or ! somewhere, but no luck.
Heres the yaml I have specifically for the adc.
sensor: - platform: adc pin: A0 name: "Daylight" icon: "mdi:sun-wireless-outline" update_interval: 120s filters: - multiply: 100 unit_of_measurement: "%"
I suspect I need to use templating or Lambda, but I’m not a wizz with either.
Any help would be appreciated.
Thanks for your time,