#VEML7700 - add low power mode

7 messages · Page 1 of 1 (latest)

granite prism
#

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();
boreal night
#

Nice job

#

Did you work also for the VEML6075 ?

granite prism
#

try looking at the datasheet to see if it has the same registers as the veml7700, I don't know or simply ask ai. I do most of my code editing using gemini or gpt.

velvet raptor
#

Thx for providing. I'm currently experimenting with battery powered devices. Is there an easy way to implement your fix by using git as external component? At the moment it seems that you have to manually download and put it into your local custom components

lost jay
#

The repo isn't arranged correctly to use as an external component.

granite prism
#

fixed