Returned to going unavailable for graphing's sake

This commit is contained in:
2023-01-21 20:17:20 -05:00
parent d7e00da9d4
commit 3258e5e22e

View File

@ -254,40 +254,45 @@ sensor:
friendly_name: "Basement Studio Lights - Brightness Actual"
value_template: >
{% set current = state_attr('light.basement_studio_lights','brightness') %}
{{ ((current / 255) * 100) | float | round(2) }}
availability_template: >
{% if is_state('light.basement_studio_lights','on') %}
{{ ((current / 255) * 100) | float | round(2) }}
true
{% else %}
{{ 0 | float | round(2) }}
false
{% endif %}
unit_of_measurement: '%'
icon_template: mdi:brightness-percent
basement_studio_lights_brightness_intended:
friendly_name: "Basement Studio Lights - Brightness Intended"
value_template: >
value_template: "{{ state_attr('switch.adaptive_lighting_basement_studio','brightness_pct') | float | round(2) }}"
availability_template: >
{% if is_state('switch.adaptive_lighting_basement_studio','on') %}
{{ state_attr('switch.adaptive_lighting_basement_studio','brightness_pct') | float | round(2) }}
true
{% else %}
{{ 0 | float | round(2) }}
false
{% endif %}
unit_of_measurement: '%'
icon_template: mdi:brightness-percent
basement_studio_lights_colortemp_actual:
friendly_name: "Basement Studio Lights - Colortemp Actual"
value_template: >
value_template: "{{ state_attr('light.basement_studio_lights','color_temp_kelvin') | int }}"
availability_template: >
{% if is_state('light.basement_studio_lights','on') %}
{{ state_attr('light.basement_studio_lights','color_temp_kelvin') | int }}
true
{% else %}
{{ '0' | float | round(2) }}
false
{% endif %}
unit_of_measurement: 'K'
icon_template: mdi:thermometer-lines
basement_studio_lights_colortemp_intended:
friendly_name: "Basement Studio Lights - Colortemp Intended"
value_template: >
value_template: "{{ state_attr('switch.adaptive_lighting_basement_studio','color_temp_kelvin') | int }}"
availability_template: >
{% if is_state('switch.adaptive_lighting_basement_studio','on') %}
{{ state_attr('switch.adaptive_lighting_basement_studio','color_temp_kelvin') | int }}
true
{% else %}
{{ 0 | float | round(2) }}
false
{% endif %}
unit_of_measurement: 'K'
icon_template: mdi:thermometer-lines