Created
November 9, 2017 00:00
-
-
Save anonymous/b87f8ea750b42fbdb2ca6669ed9aa73e to your computer and use it in GitHub Desktop.
Home Assistant Exterior Lux approximation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- platform: template | |
sensors: | |
above_cloud_lux: | |
friendly_name: "Above Cloud Lux" | |
unit_of_measurement: "Lux" | |
value_template: >- | |
{{ states.sun.sun.attributes.daylight | round(0) }} | |
lux: | |
friendly_name: "Exterior Lux" | |
unit_of_measurement: "lux" | |
value_template: '{{ ((100-states.sensor.dark_sky_cloud_coverage.state|float)/100 * states.sun.sun.attributes.daylight) | round(0) }}' | |
# consider using other methods of calculation here as well | |
# this could be calculated using the wunderground solar_radiation value, if available |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment