yamllint
This commit is contained in:
@@ -6172,12 +6172,12 @@ variables:
|
|||||||
rgbw: "[<ColorMode.RGBW: 'rgbw'>]"
|
rgbw: "[<ColorMode.RGBW: 'rgbw'>]"
|
||||||
rgbww: "[<ColorMode.RGBWW: 'rgbww'>]"
|
rgbww: "[<ColorMode.RGBWW: 'rgbww'>]"
|
||||||
white: "[<ColorMode.WHITE: ''>]"
|
white: "[<ColorMode.WHITE: ''>]"
|
||||||
# yamllint disable rule:truthy rule:line-length
|
|
||||||
states:
|
states:
|
||||||
|
# yamllint disable rule:truthy rule:line-length
|
||||||
"on": ["on", "open", "opening", "true", "True", true, True, "playing", "heat", "cold", "dry", "armed_home", "armed_away", "armed_vacation", "armed_custom_bypass", "triggered", "pending", "arming", 1]
|
"on": ["on", "open", "opening", "true", "True", true, True, "playing", "heat", "cold", "dry", "armed_home", "armed_away", "armed_vacation", "armed_custom_bypass", "triggered", "pending", "arming", 1]
|
||||||
"off": ["off", "closed", "closing", "false", "False", false, False, "standby", "paused", "idle", "disarmed", "disarming", 0]
|
"off": ["off", "closed", "closing", "false", "False", false, False, "standby", "paused", "idle", "disarmed", "disarming", 0]
|
||||||
unknown: ["unknown", "unavailable", None, none, ""]
|
unknown: ["unknown", "unavailable", None, none, ""]
|
||||||
# yamllint enable rule:truthy rule:line-length
|
# yamllint enable rule:truthy rule:line-length
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
##### CLOSE - Variables #####
|
##### CLOSE - Variables #####
|
||||||
@@ -7336,7 +7336,9 @@ action:
|
|||||||
- &refresh-page_home-weather_pic
|
- &refresh-page_home-weather_pic
|
||||||
service: '{{ nextion.command.printf }}'
|
service: '{{ nextion.command.printf }}'
|
||||||
data:
|
data:
|
||||||
cmd: home.weather.pic={{ nextion.pic.weather[states(weather_entity) | default("unavailable") if weather_entity is string and has_value(weather_entity) else "unavailable"] | default(None) }}
|
cmd: home.weather.pic={{ nextion.pic.weather[states(weather_entity) | default("unavailable")
|
||||||
|
if weather_entity is string and has_value(weather_entity)
|
||||||
|
else "unavailable"] | default(None) }}
|
||||||
continue_on_error: true
|
continue_on_error: true
|
||||||
|
|
||||||
- &refresh-page_home-outdoor_temp
|
- &refresh-page_home-outdoor_temp
|
||||||
@@ -7417,7 +7419,7 @@ action:
|
|||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
icon:
|
icon:
|
||||||
icon: !input 'home_indoor_temp_icon' # E50E
|
icon: !input 'home_indoor_temp_icon'
|
||||||
color_rgb: !input 'home_indoor_temp_icon_color'
|
color_rgb: !input 'home_indoor_temp_icon_color'
|
||||||
label:
|
label:
|
||||||
color_rgb: !input 'home_indoor_temp_label_color'
|
color_rgb: !input 'home_indoor_temp_label_color'
|
||||||
@@ -7474,7 +7476,6 @@ action:
|
|||||||
##### SET Left Hardware Button PIC on Home Page ####
|
##### SET Left Hardware Button PIC on Home Page ####
|
||||||
- if: '{{ left_button_state not in ["unavailable", "unknown", "", None] }}'
|
- if: '{{ left_button_state not in ["unavailable", "unknown", "", None] }}'
|
||||||
then:
|
then:
|
||||||
# Hardware Button PIC
|
|
||||||
- *delay-default
|
- *delay-default
|
||||||
- service: '{{ nextion.command.printf }}'
|
- service: '{{ nextion.command.printf }}'
|
||||||
data:
|
data:
|
||||||
@@ -7484,7 +7485,6 @@ action:
|
|||||||
##### SET Right Hardware Button PIC on Home Page #####
|
##### SET Right Hardware Button PIC on Home Page #####
|
||||||
- if: '{{ right_button_state not in ["unavailable", "unknown", "", None] }}'
|
- if: '{{ right_button_state not in ["unavailable", "unknown", "", None] }}'
|
||||||
then:
|
then:
|
||||||
# Hardware Button PIC
|
|
||||||
- *delay-default
|
- *delay-default
|
||||||
- service: '{{ nextion.command.printf }}'
|
- service: '{{ nextion.command.printf }}'
|
||||||
data:
|
data:
|
||||||
@@ -8089,7 +8089,9 @@ action:
|
|||||||
if repeat.item.icon.split(":") | count > 0
|
if repeat.item.icon.split(":") | count > 0
|
||||||
else repeat.item.icon
|
else repeat.item.icon
|
||||||
}}
|
}}
|
||||||
{% elif state_attr(repeat.item.entity, "icon") | default("") not in ["unavailable", "unknown", "", None] and all_icons[state_attr(repeat.item.entity, "icon").split(":")[1]] != null %}
|
{% elif
|
||||||
|
state_attr(repeat.item.entity, "icon") | default("") not in ["unavailable", "unknown", "", None] and
|
||||||
|
all_icons[state_attr(repeat.item.entity, "icon").split(":")[1]] != null %}
|
||||||
{{ all_icons[state_attr(repeat.item.entity, "icon").split(":")[1]] | default(all_icons.unknown) }}
|
{{ all_icons[state_attr(repeat.item.entity, "icon").split(":")[1]] | default(all_icons.unknown) }}
|
||||||
{% elif repeat.item.entity and repeat.item.entity.split(".") | count > 1 %}
|
{% elif repeat.item.entity and repeat.item.entity.split(".") | count > 1 %}
|
||||||
{{ nextion.icon.domain[repeat.item.entity.split(".")[0] if repeat.item.entity else "unknown"] }}
|
{{ nextion.icon.domain[repeat.item.entity.split(".")[0] if repeat.item.entity else "unknown"] }}
|
||||||
@@ -8118,11 +8120,18 @@ action:
|
|||||||
{{ (state_attr(repeat.item.entity, "brightness") | int * 100 /255) | round(0) }}%
|
{{ (state_attr(repeat.item.entity, "brightness") | int * 100 /255) | round(0) }}%
|
||||||
{% elif item_domain == "fan" and current_entity_state == "on" and state_attr(repeat.item.entity, "percentage") != None %}
|
{% elif item_domain == "fan" and current_entity_state == "on" and state_attr(repeat.item.entity, "percentage") != None %}
|
||||||
{{ state_attr(repeat.item.entity, "percentage") | round(0, default=0) }}%
|
{{ state_attr(repeat.item.entity, "percentage") | round(0, default=0) }}%
|
||||||
{% elif item_domain == "cover" and current_entity_state in ["open", "opening", "closing"] and state_attr(repeat.item.entity, "current_position") != None %}
|
{% elif
|
||||||
|
item_domain == "cover" and
|
||||||
|
current_entity_state in ["open", "opening", "closing"] and
|
||||||
|
state_attr(repeat.item.entity, "current_position") != None %}
|
||||||
{{ (state_attr(repeat.item.entity, "current_position") | int(100)) | round(0) }}%
|
{{ (state_attr(repeat.item.entity, "current_position") | int(100)) | round(0) }}%
|
||||||
{% elif item_domain == "climate" and state_attr(repeat.item.entity, 'current_temperature') != None %}
|
{% elif item_domain == "climate" and state_attr(repeat.item.entity, 'current_temperature') != None %}
|
||||||
{% set current_temperature = state_attr(repeat.item.entity, 'current_temperature') | float %}
|
{% set current_temperature = state_attr(repeat.item.entity, 'current_temperature') | float %}
|
||||||
{{ current_temperature | round(0) if current_temperature >= 100 or temperature_units in ["F", "f", "°F", "°f", "K", "k"] else current_temperature | round(1) }}{{ temperature_units }}
|
{{
|
||||||
|
current_temperature | round(0)
|
||||||
|
if current_temperature >= 100 or temperature_units in ["F", "f", "°F", "°f", "K", "k"]
|
||||||
|
else current_temperature | round(1)
|
||||||
|
}}{{ temperature_units}}
|
||||||
{% else %} 0
|
{% else %} 0
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- *delay-default
|
- *delay-default
|
||||||
@@ -8449,8 +8458,18 @@ action:
|
|||||||
is_volume_muted: '{{ media_player.is_volume_muted if media_player.is_volume_muted is boolean else false }}'
|
is_volume_muted: '{{ media_player.is_volume_muted if media_player.is_volume_muted is boolean else false }}'
|
||||||
friendly_name: '{{ media_player.friendly_name if media_player.friendly_name is string else "" }}'
|
friendly_name: '{{ media_player.friendly_name if media_player.friendly_name is string else "" }}'
|
||||||
volume_level: '{{ media_player.volume_level }}'
|
volume_level: '{{ media_player.volume_level }}'
|
||||||
media_title: '{{ media_player.media_title if media_player.media_title is string and media_player.media_title not in [null, None, "unknown", "unavailable"] else "" }}'
|
media_title: >
|
||||||
media_artist: '{{ media_player.media_artist if media_player.media_artist is string and media_player.media_artist not in [null, None, "unknown", "unavailable"] else "" }}'
|
{{
|
||||||
|
media_player.media_title
|
||||||
|
if media_player.media_title is string and media_player.media_title not in [null, None, "unknown", "unavailable"]
|
||||||
|
else ""
|
||||||
|
}}
|
||||||
|
media_artist: >
|
||||||
|
{{
|
||||||
|
media_player.media_artist
|
||||||
|
if media_player.media_artist is string and media_player.media_artist not in [null, None, "unknown", "unavailable"]
|
||||||
|
else ""
|
||||||
|
}}
|
||||||
media_duration: '{{ media_player.media_duration }}'
|
media_duration: '{{ media_player.media_duration }}'
|
||||||
media_position: '{{ media_player.media_position }}'
|
media_position: '{{ media_player.media_position }}'
|
||||||
media_position_delta: >
|
media_position_delta: >
|
||||||
@@ -8966,15 +8985,37 @@ action:
|
|||||||
{% else %} Other
|
{% else %} Other
|
||||||
{% endif %}
|
{% endif %}
|
||||||
weather_units:
|
weather_units:
|
||||||
humidity: '{{ state_attr(weather_entity, "humidity_unit") | default("%") if weather_entity is string and state_attr(weather_entity, "humidity_unit") else "%" }}'
|
humidity: >
|
||||||
hours_of_sun: '{{ state_attr(weather_entity, "hours_of_sun_unit") | default("h") if weather_entity is string and state_attr(weather_entity, "hours_of_sun_unit") else "h" }}'
|
{{
|
||||||
precipitation: '{{ state_attr(weather_entity, "precipitation_unit") | default("") if weather_entity is string and state_attr(weather_entity, "precipitation_unit") }}'
|
state_attr(weather_entity, "humidity_unit") | default("%")
|
||||||
precipitation_probability: '{{ state_attr(weather_entity, "precipitation_probability_unit") | default("%") if weather_entity is string and state_attr(weather_entity, "precipitation_probability_unit") else "%" }}'
|
if weather_entity is string and state_attr(weather_entity, "humidity_unit")
|
||||||
|
else "%"
|
||||||
|
}}
|
||||||
|
hours_of_sun: >
|
||||||
|
{{
|
||||||
|
state_attr(weather_entity, "hours_of_sun_unit") | default("h")
|
||||||
|
if weather_entity is string and state_attr(weather_entity, "hours_of_sun_unit")
|
||||||
|
else "h"
|
||||||
|
}}
|
||||||
|
precipitation: >
|
||||||
|
{{
|
||||||
|
state_attr(weather_entity, "precipitation_unit") | default("")
|
||||||
|
if weather_entity is string and state_attr(weather_entity, "precipitation_unit")
|
||||||
|
}}
|
||||||
|
precipitation_probability: >
|
||||||
|
{{
|
||||||
|
state_attr(weather_entity, "precipitation_probability_unit") | default("%")
|
||||||
|
if weather_entity is string and state_attr(weather_entity, "precipitation_probability_unit")
|
||||||
|
else "%"
|
||||||
|
}}
|
||||||
pressure: '{{ state_attr(weather_entity, "pressure_unit") | default("") if weather_entity is string and state_attr(weather_entity, "pressure_unit") }}'
|
pressure: '{{ state_attr(weather_entity, "pressure_unit") | default("") if weather_entity is string and state_attr(weather_entity, "pressure_unit") }}'
|
||||||
# temperature: '{{ state_attr(weather_entity, "temperature_unit") | default("°") if weather_entity is string and state_attr(weather_entity, "temperature_unit") else "°" }}'
|
thunderstorm_probability: >
|
||||||
thunderstorm_probability: '{{ state_attr(weather_entity, "thunderstorm_probability_unit") | default("%") if weather_entity is string and state_attr(weather_entity, "thunderstorm_probability_unit") else "%" }}'
|
{{
|
||||||
|
state_attr(weather_entity, "thunderstorm_probability_unit") | default("%")
|
||||||
|
if weather_entity is string and state_attr(weather_entity, "thunderstorm_probability_unit")
|
||||||
|
else "%"
|
||||||
|
}}
|
||||||
uv_index: '{{ state_attr(weather_entity, "uv_index_unit") | default("") if weather_entity is string and state_attr(weather_entity, "uv_index_unit") }}'
|
uv_index: '{{ state_attr(weather_entity, "uv_index_unit") | default("") if weather_entity is string and state_attr(weather_entity, "uv_index_unit") }}'
|
||||||
# visibility: '{{ state_attr(weather_entity, "visibility_unit") | default("") if weather_entity is string and state_attr(weather_entity, "visibility_unit") }}'
|
|
||||||
wind_speed: '{{ state_attr(weather_entity, "wind_speed_unit") | default("") if weather_entity is string and state_attr(weather_entity, "wind_speed_unit") }}'
|
wind_speed: '{{ state_attr(weather_entity, "wind_speed_unit") | default("") if weather_entity is string and state_attr(weather_entity, "wind_speed_unit") }}'
|
||||||
page_name: '{{ nspanel_event.page }}'
|
page_name: '{{ nspanel_event.page }}'
|
||||||
page_index: '{{ (page_name[-2:] | int(0)) - 1 }}'
|
page_index: '{{ (page_name[-2:] | int(0)) - 1 }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user