diff --git a/esphome_config/weatherstation.yml b/esphome_config/weatherstation.yml index 0636ef4..0e2e368 100644 --- a/esphome_config/weatherstation.yml +++ b/esphome_config/weatherstation.yml @@ -60,9 +60,10 @@ sensor: name: "APDS9960_blue_channel" id: apds9960_blue - platform: template - name: "lux" + name: "light" lambda: |- - return (-0.32466F * id(apds9960_red)..raw_state) + (1.57837F * id(apds9960_green)..raw_state) + (-0.73191F * id(apds9960_blue)..raw_state); + # TODO fix calculation to get lux instead of a percentual value + return (-0.32466F * id(apds9960_red).raw_state) + (1.57837F * id(apds9960_green).raw_state) + (-0.73191F * id(apds9960_blue).raw_state); update_interval: 300s unit_of_measurement: 'lux'