I have ESP32. I control the LEDC output from HA. But how can I check the actual state of the pin? For example in case of rebooting or power loss.
output:
- platform: ledc
pin: GPIO12
frequency: 9765 Hz
id: push_fan_speed
api:
services:
- service: set_push_value
variables:
push_value: int
then:
- output.set_level:
id: push_fan_speed
level: !lambda 'return push_value / 100.0;'
- platform: template
name: check pwm
id: checkPWM
lambda: return state(push_fan_speed);