Enable low power consumption: https://github.com/tiimsvk/veml7700-esphome-low-power
Power consumption:
normal run: 50μA
power save: 5μA ready / 0.4μA standby
Config yaml:
sensor:
- platform: veml7700
id: veml
address: 0x10
update_interval: 10s
auto_mode: false
gain: 1/8X
integration_time: 25ms
glass_attenuation_factor: 1.0
power_saving_enabled: false
power_saving_mode: 4 # 1..4, 4 - high power save
infrared: "IR"
ambient_light: "Ambient light"
full_spectrum: "Full spectrum"
# enable power save
switch:
- platform: template
name: "VEML7700 power save"
turn_on_action:
- lambda: |-
id(veml).apply_power_saving(true);
turn_off_action:
- lambda: |-
id(veml).apply_power_saving(false);
lambda: |-
return id(veml).is_power_saving_enabled();