I am looking for a way to vary a led strip according to the brightness, but no matter what I try, it doesn’t work. In the examples I find, they suggest varying it with the parameters “light.turn_on”, but I am using the esp8266_pwm platform and it does not accept it.
An example :
output:
- platform: esp8266_pwm
pin: D8
frequency: 1000 Hz
id: pwm_output
# Example usage in a light
light:
- platform: monochromatic
output: pwm_output
name: "LED Bureau"
id: light_actual
i2c:
sda: D4
scl: D3
scan: True
sensor:
- platform: bh1750
name: "Luminosité"
address: 0x23
id: bh1750_sensor
update_interval: 10s
on_value:
- lambda: |-
auto light = id(light_actual);
auto brightness = x * 0.1; // Ajustez la valeur 0.1 pour régler la sensibilité
light.set_frequency(brightness);
Do you some example for me please ?