Hi, im using a GUVA-S12SD for measuring UV index.
The fluxuation is crazy from 1 to 10 in the space of 1 minute, changing all the time.
Any ideas why this is?
Thanks
sensor:
- platform: adc
pin: GPIO33 # use your desired input pin here
name: "ADC voltage"
update_interval: 60s
id: "uv_index_source"
accuracy_decimals: 3
internal: true
- platform: template
name: "UV index"
accuracy_decimals: 0
unit_of_measurement: ""
icon: "mdi:sun-wireless"
lambda: |-
if (id(uv_index_source).state < 0.05)
return 0;
if (id(uv_index_source).state <= 0.227)
return 1;
if (id(uv_index_source).state <= 0.32)
return 2;
if (id(uv_index_source).state <= 0.4)
return 3;
if (id(uv_index_source).state <= 0.5)
return 4;
if (id(uv_index_source).state <= 0.6)
return 5;
if (id(uv_index_source).state <= 0.69)
return 6;
if (id(uv_index_source).state <= 0.8)
return 7;
if (id(uv_index_source).state <= 0.88)
return 8;
if (id(uv_index_source).state <= 0.97)
return 9;
if (id(uv_index_source).state <= 1.08)
return 10;
return 11;