I have an Aisirer bulb set up for my bathroom. It should have different brightness values throughout the day/night. I did accomplish it but the 100% brightness seems off to what the bulb has when it is turned on.
Here is the esphome yml:
esphome:
name: bad
platform: ESP8266
board: esp01_1m
on_loop:
then:
- if:
condition:
or:
- lambda: 'return id(homeassistant_time).now().hour > 21;'
- lambda: 'return id(homeassistant_time).now().hour < 6;'
then:
- logger.log:
format: "time1 %.0i"
args: [ 'id(homeassistant_time).now().hour' ]
level: WARN
- light.control:
id: licht
brightness: 0.14
#- output.set_level:
# id: output_component1
# level: 0.5
else:
- logger.log:
format: "time2: %.0i"
args: [ 'id(homeassistant_time).now().hour' ]
level: WARN
- light.control:
id: licht
brightness: 1
#- output.set_level:
# id: output_component1
# level: 0.5
wifi:
ssid: !secret wlan_ssid
password: !secret wlan_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Bad Fallback Hotspot"
password: "..."
captive_portal:
# Enable logging
logger:
level: ERROR
# Enable Home Assistant API
api:
password: !secret generalpassword
ota:
password: !secret generalpassword
time:
- platform: homeassistant
id: homeassistant_time
light:
- platform: monochromatic
name: "Bad"
id: licht
output: output_component1
restore_mode: ALWAYS_ON
gamma_correct: 0
output:
- platform: esp8266_pwm
id: output_component1
pin: GPIO05
So when the bulb turns on via the switch it has full brightness. After the on_loop
automation kicks in, the brightness becomes less although it shows 100% in home assistant. I played a bit with the gamma_correct
value without success. What did I miss?