mirror of
https://github.com/HASwitchPlate/HASPone.git
synced 2025-07-25 12:16:41 +00:00
1.02 dev release
This commit is contained in:
commit
33c8e87d21
12
.github/FUNDING.yml
vendored
Normal file
12
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: aderusha # Replace with up to 4 GitHub Sponsors-enabled usernames
|
||||||
|
patreon: # Replace with a single Patreon username
|
||||||
|
open_collective: # Replace with a single Open Collective username
|
||||||
|
ko_fi: # Replace with a single Ko-fi username
|
||||||
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
|
liberapay: # Replace with a single Liberapay username
|
||||||
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
|
otechie: # Replace with a single Otechie username
|
||||||
|
custom: ['https://www.buymeacoffee.com/gW5rPpsKR','https://www.tindie.com/stores/luma/'] # Up to 4 links
|
@ -76,7 +76,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -91,14 +90,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
|
@ -67,7 +67,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
targetpage: !input targetpage
|
targetpage: !input targetpage
|
||||||
@ -78,7 +77,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
||||||
{%- set activepage.entity=entity -%}
|
{%- set activepage.entity=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
||||||
@ -89,14 +87,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -132,7 +128,6 @@ action:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
||||||
{%- set currentpage.entity=entity -%}
|
{%- set currentpage.entity=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- if states(currentpage.entity) == targetpage -%}
|
{%- if states(currentpage.entity) == targetpage -%}
|
||||||
|
@ -365,7 +365,91 @@ action:
|
|||||||
[{% for p in range(1,12) %}"p[{{p}}].b[1].font={{page1font}}","p[{{p}}].b[1].txt=\"{{page1text}}\"",{% endfor %}
|
[{% for p in range(1,12) %}"p[{{p}}].b[1].font={{page1font}}","p[{{p}}].b[1].txt=\"{{page1text}}\"",{% endfor %}
|
||||||
{% for p in range(1,12) %}"p[{{p}}].b[2].font={{page2font}}","p[{{p}}].b[2].txt=\"{% if page_scroll %}{{page_names.get("page" ~ p)}}{% else %}{{page2text}}{% endif %}\"",{% endfor %}
|
{% for p in range(1,12) %}"p[{{p}}].b[2].font={{page2font}}","p[{{p}}].b[2].txt=\"{% if page_scroll %}{{page_names.get("page" ~ p)}}{% else %}{{page2text}}{% endif %}\"",{% endfor %}
|
||||||
{% for p in range(1,12) %}"p[{{p}}].b[3].font={{page3font}}","p[{{p}}].b[3].txt=\"{{page3text}}\""{% if not loop.last %},{% endif %}{% endfor %}]
|
{% for p in range(1,12) %}"p[{{p}}].b[3].font={{page3font}}","p[{{p}}].b[3].txt=\"{{page3text}}\""{% if not loop.last %},{% endif %}{% endfor %}]
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
- delay: "00:00:01" # give MQTT discovery a second to find our RGB theme lights
|
||||||
|
- service: mqtt.publish # apply selected foreground color to page select buttons
|
||||||
|
data:
|
||||||
|
topic: "{{jsoncommandtopic}}"
|
||||||
|
payload: >-
|
||||||
|
{%- set color = namespace() -%}
|
||||||
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
|
{%- set color.source=entity -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
|
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%}
|
||||||
|
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%}
|
||||||
|
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%}
|
||||||
|
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int -%}
|
||||||
|
[{%- if not page_scroll -%}{%- for p in range(1,12) %}{%- if p == page1page|int %}"p[{{p}}].b[1].pco={{colorcode}}"{%- else -%}"p[{{p}}].b[1].pco2={{colorcode}}"{%- endif -%},{%- endfor -%}
|
||||||
|
{%- else -%}{%- for p in range(1,12) %}"p[{{p}}].b[1].pco2={{colorcode}}",{%- endfor -%}{%- endif -%}
|
||||||
|
{%- for p in range(1,12) %}{%- if p == page2page|int %}"p[{{p}}].b[2].pco={{colorcode}}"{%- else -%}"p[{{p}}].b[2].pco2={{colorcode}}"{%- endif -%},{%- endfor -%}
|
||||||
|
{%- if not page_scroll -%}{%- for p in range(1,12) %}{%- if p == page3page|int %}"p[{{p}}].b[3].pco={{colorcode}}"{%- else -%}"p[{{p}}].b[3].pco2={{colorcode}}"{%- endif -%}{% if not loop.last %},{% endif %}{%- endfor -%}
|
||||||
|
{%- else -%}{%- for p in range(1,12) %}"p[{{p}}].b[3].pco2={{colorcode}}"{% if not loop.last %},{% endif %}{%- endfor -%}{%- endif -%}]
|
||||||
|
- service: mqtt.publish # apply selected background color to page select buttons
|
||||||
|
data:
|
||||||
|
topic: "{{jsoncommandtopic}}"
|
||||||
|
payload: >-
|
||||||
|
{%- set color = namespace() -%}
|
||||||
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
|
{%- set color.source=entity -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
|
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%}
|
||||||
|
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%}
|
||||||
|
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%}
|
||||||
|
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int -%}
|
||||||
|
[{%- if not page_scroll -%}{%- for p in range(1,12) %}{%- if p == page1page|int %}"p[{{p}}].b[1].bco={{colorcode}}"{%- else -%}"p[{{p}}].b[1].bco2={{colorcode}}"{%- endif -%},{%- endfor -%}
|
||||||
|
{% else %}{%- for p in range(1,12) %}"p[{{p}}].b[1].bco2={{colorcode}}",{%- endfor -%}{%- endif -%}
|
||||||
|
{%- for p in range(1,12) %}{%- if p == page2page|int %}"p[{{p}}].b[2].bco={{colorcode}}"{%- else -%}"p[{{p}}].b[2].bco2={{colorcode}}"{%- endif -%},{%- endfor -%}
|
||||||
|
{%- if not page_scroll -%}{%- for p in range(1,12) %}{%- if p == page3page|int %}"p[{{p}}].b[3].bco={{colorcode}}"{%- else -%}"p[{{p}}].b[3].bco2={{colorcode}}"{%- endif -%}{% if not loop.last %},{% endif %}{%- endfor -%}
|
||||||
|
{% else %}{%- for p in range(1,12) %}"p[{{p}}].b[3].bco2={{colorcode}}"{% if not loop.last %},{% endif %}{%- endfor -%}{%- endif -%}]
|
||||||
|
- service: mqtt.publish # apply unselected foreground color to page select buttons
|
||||||
|
data:
|
||||||
|
topic: "{{jsoncommandtopic}}"
|
||||||
|
payload: >-
|
||||||
|
{%- set color = namespace() -%}
|
||||||
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
|
{%- set color.source=entity -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
|
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%}
|
||||||
|
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%}
|
||||||
|
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%}
|
||||||
|
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int -%}
|
||||||
|
[{%- if not page_scroll -%}{%- for p in range(1,12) %}{%- if p == page1page|int %}"p[{{p}}].b[1].pco2={{colorcode}}"{%- else -%}"p[{{p}}].b[1].pco={{colorcode}}"{%- endif -%},{%- endfor -%}
|
||||||
|
{% else %}{%- for p in range(1,12) %}"p[{{p}}].b[1].pco={{colorcode}}",{%- endfor -%}{%- endif -%}
|
||||||
|
{%- for p in range(1,12) %}{%- if p == page2page|int %}"p[{{p}}].b[2].pco2={{colorcode}}"{%- else -%}"p[{{p}}].b[2].pco={{colorcode}}"{%- endif -%},{%- endfor -%}
|
||||||
|
{%- if not page_scroll -%}{%- for p in range(1,12) %}{%- if p == page3page|int %}"p[{{p}}].b[3].pco2={{colorcode}}"{%- else -%}"p[{{p}}].b[3].pco={{colorcode}}"{%- endif -%}{% if not loop.last %},{% endif %}{%- endfor -%}
|
||||||
|
{% else %}{%- for p in range(1,12) %}"p[{{p}}].b[3].pco={{colorcode}}"{% if not loop.last %},{% endif %}{%- endfor -%}{%- endif -%}]
|
||||||
|
- service: mqtt.publish # apply unselected background color to page select buttons
|
||||||
|
data:
|
||||||
|
topic: "{{jsoncommandtopic}}"
|
||||||
|
payload: >-
|
||||||
|
{%- set color = namespace() -%}
|
||||||
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
|
{%- set color.source=entity -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
|
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%}
|
||||||
|
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%}
|
||||||
|
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%}
|
||||||
|
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int -%}
|
||||||
|
[{%- if not page_scroll -%}{%- for p in range(1,12) %}{%- if p == page1page|int %}"p[{{p}}].b[1].bco2={{colorcode}}"{%- else -%}"p[{{p}}].b[1].bco={{colorcode}}"{%- endif -%},{%- endfor -%}
|
||||||
|
{% else %}{%- for p in range(1,12) %}"p[{{p}}].b[1].bco={{colorcode}}",{%- endfor -%}{%- endif -%}
|
||||||
|
{%- for p in range(1,12) %}{%- if p == page2page|int %}"p[{{p}}].b[2].bco2={{colorcode}}"{%- else -%}"p[{{p}}].b[2].bco={{colorcode}}"{%- endif -%},{%- endfor -%}
|
||||||
|
{%- if not page_scroll -%}{%- for p in range(1,12) %}{%- if p == page3page|int %}"p[{{p}}].b[3].bco2={{colorcode}}"{%- else -%}"p[{{p}}].b[3].bco={{colorcode}}"{%- endif -%}{% if not loop.last %},{% endif %}{%- endfor -%}
|
||||||
|
{% else %}{%- for p in range(1,12) %}"p[{{p}}].b[3].bco={{colorcode}}"{% if not loop.last %},{% endif %}{%- endfor -%}{%- endif -%}]
|
||||||
|
>>>>>>> 7ab5075d13da52a0f5f1d0e63073aa2343368652
|
||||||
- choose:
|
- choose:
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# Create a notification with the lovelace entity card YAML
|
# Create a notification with the lovelace entity card YAML
|
||||||
|
@ -59,14 +59,12 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspClientId: '{{state_attr(haspsensor, "haspClientID")}}'
|
haspClientId: '{{state_attr(haspsensor, "haspClientID")}}'
|
||||||
@ -80,7 +78,6 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|
||||||
|
@ -57,7 +57,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
darkvalue: !input darkvalue
|
darkvalue: !input darkvalue
|
||||||
@ -71,14 +70,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
|
@ -63,7 +63,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
alarmpanel: !input alarmpanel
|
alarmpanel: !input alarmpanel
|
||||||
@ -76,7 +75,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspIP: '{{state_attr(haspsensor, "haspIP")}}'
|
haspIP: '{{state_attr(haspsensor, "haspIP")}}'
|
||||||
@ -94,7 +92,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -107,7 +104,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -120,7 +116,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -133,7 +128,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -152,14 +146,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -199,6 +191,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -60,7 +60,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -78,7 +77,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
||||||
{%- set activepage.entity=entity -%}
|
{%- set activepage.entity=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
||||||
@ -87,7 +85,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -100,7 +97,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -113,7 +109,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -126,7 +121,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -149,14 +143,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -197,6 +189,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -152,14 +152,12 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -189,7 +187,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -202,7 +199,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -215,7 +211,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -228,7 +223,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -243,14 +237,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -289,6 +281,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -65,7 +65,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -80,7 +79,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
||||||
{%- set activepage.entity=entity -%}
|
{%- set activepage.entity=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
||||||
@ -93,7 +91,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -106,7 +103,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -119,7 +115,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -132,7 +127,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -155,14 +149,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -203,6 +195,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -134,7 +134,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -165,7 +164,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
||||||
{%- set activepage.entity=entity -%}
|
{%- set activepage.entity=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
||||||
@ -178,7 +176,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -191,7 +188,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -204,7 +200,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -217,7 +212,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -241,14 +235,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -289,6 +281,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -192,7 +192,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -241,7 +240,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -254,7 +252,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -267,7 +264,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -280,7 +276,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -295,14 +290,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -343,6 +336,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -121,14 +121,12 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
heatpump: !input heatpump
|
heatpump: !input heatpump
|
||||||
@ -152,7 +150,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -165,7 +162,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -178,7 +174,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -191,7 +186,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -272,14 +266,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
toggle_hp_state: "{%- if hp_is_off -%}heat_cool{%- else -%}off{%- endif -%}"
|
toggle_hp_state: "{%- if hp_is_off -%}heat_cool{%- else -%}off{%- endif -%}"
|
||||||
@ -321,6 +313,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -121,14 +121,12 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
heatpump: !input heatpump
|
heatpump: !input heatpump
|
||||||
@ -152,7 +150,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -165,7 +162,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -178,7 +174,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -191,7 +186,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -272,14 +266,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
toggle_hp_state: "{%- if hp_is_off -%}heat_cool{%- else -%}off{%- endif -%}"
|
toggle_hp_state: "{%- if hp_is_off -%}heat_cool{%- else -%}off{%- endif -%}"
|
||||||
@ -321,6 +313,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -58,14 +58,12 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
mediaplayer: !input mediaplayer
|
mediaplayer: !input mediaplayer
|
||||||
@ -85,7 +83,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -98,7 +95,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -111,7 +107,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -124,7 +119,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -153,14 +147,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -201,6 +193,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -181,14 +181,12 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -244,7 +242,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
||||||
{%- set activepage.entity=entity -%}
|
{%- set activepage.entity=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
||||||
@ -257,7 +254,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -270,7 +266,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -283,7 +278,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -296,7 +290,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -329,14 +322,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -377,6 +368,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -204,14 +204,12 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -277,7 +275,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
||||||
{%- set activepage.entity=entity -%}
|
{%- set activepage.entity=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
||||||
@ -290,7 +287,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -303,7 +299,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -316,7 +311,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -329,7 +323,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -368,14 +361,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -416,6 +407,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -165,7 +165,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -192,7 +191,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -205,7 +203,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -218,7 +215,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -231,7 +227,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -246,14 +241,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -294,6 +287,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -149,7 +149,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -175,7 +174,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -188,7 +186,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -201,7 +198,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -214,7 +210,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -229,14 +224,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -273,6 +266,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -276,7 +276,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -313,7 +312,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -326,7 +324,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -339,7 +336,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -352,7 +348,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -375,14 +370,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -427,6 +420,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -47,7 +47,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
volumeentity: !input volumeentity
|
volumeentity: !input volumeentity
|
||||||
@ -63,7 +62,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -76,7 +74,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -92,14 +89,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
# jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
# jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -135,6 +130,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -148,7 +148,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -176,7 +175,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -189,7 +187,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -202,7 +199,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -215,7 +211,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -230,14 +225,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}'
|
selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}'
|
||||||
@ -275,6 +268,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -64,14 +64,12 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -147,7 +145,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
||||||
{%- set activepage.entity=entity -%}
|
{%- set activepage.entity=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
||||||
@ -160,7 +157,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -173,7 +169,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -186,7 +181,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -199,7 +193,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -214,14 +207,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -262,6 +253,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -64,14 +64,12 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -147,7 +145,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^number\..*_active_page(?:_\d+|)$") -%}
|
||||||
{%- set activepage.entity=entity -%}
|
{%- set activepage.entity=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %}
|
||||||
@ -160,7 +157,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -173,7 +169,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -186,7 +181,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -199,7 +193,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -214,14 +207,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
@ -262,6 +253,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -176,7 +176,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -215,7 +214,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -228,7 +226,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -241,7 +238,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -254,7 +250,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{%- set color.source=entity -%}
|
{%- set color.source=entity -%}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%}
|
||||||
@ -269,14 +264,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}'
|
selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}'
|
||||||
@ -313,6 +306,8 @@ action:
|
|||||||
value_template: >-
|
value_template: >-
|
||||||
{{-
|
{{-
|
||||||
(trigger is not defined)
|
(trigger is not defined)
|
||||||
|
or
|
||||||
|
(trigger.platform is none)
|
||||||
or
|
or
|
||||||
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
((trigger.platform == 'homeassistant') and (trigger.event == 'start'))
|
||||||
or
|
or
|
||||||
|
@ -70,7 +70,6 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
hasppage: !input hasppage
|
hasppage: !input hasppage
|
||||||
@ -82,14 +81,12 @@ trigger_variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\.") -%}
|
{%- if entity|regex_search("^sensor\.") -%}
|
||||||
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
{{- entity|regex_replace(find="^sensor\.", replace="", ignorecase=true)|regex_replace(find="_sensor(?:_\d+|)$", replace="", ignorecase=true) -}}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
haspsensor: >-
|
haspsensor: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^sensor\..+_sensor(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
|
||||||
|
@ -28,28 +28,24 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
selectedbg_entity: >-
|
selectedbg_entity: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
unselectedfg_entity: >-
|
unselectedfg_entity: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
unselectedbg_entity: >-
|
unselectedbg_entity: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
selected_foreground_brightness: "1"
|
selected_foreground_brightness: "1"
|
||||||
|
@ -28,28 +28,24 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
selectedbg_entity: >-
|
selectedbg_entity: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
unselectedfg_entity: >-
|
unselectedfg_entity: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
unselectedbg_entity: >-
|
unselectedbg_entity: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
selected_foreground_brightness: "255"
|
selected_foreground_brightness: "255"
|
||||||
|
@ -28,28 +28,24 @@ variables:
|
|||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
selectedbg_entity: >-
|
selectedbg_entity: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_selected_background_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
unselectedfg_entity: >-
|
unselectedfg_entity: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_foreground_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
unselectedbg_entity: >-
|
unselectedbg_entity: >-
|
||||||
{%- for entity in device_entities(haspdevice) -%}
|
{%- for entity in device_entities(haspdevice) -%}
|
||||||
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
{%- if entity|regex_search("^light\..*_unselected_background_color(?:_\d+|)$") -%}
|
||||||
{{ entity }}
|
{{ entity }}
|
||||||
{{ break }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
selected_foreground_brightness: "255"
|
selected_foreground_brightness: "255"
|
||||||
|
@ -18,7 +18,11 @@ This build requires some specialist skills and tools. [You can buy an assembled
|
|||||||
|
|
||||||
## [Setup HASPone for Home Assistant](https://github.com/HASwitchPlate/HASPone/wiki/Configure-your-HASPone-for-Home-Assistant)
|
## [Setup HASPone for Home Assistant](https://github.com/HASwitchPlate/HASPone/wiki/Configure-your-HASPone-for-Home-Assistant)
|
||||||
|
|
||||||
If you're purchased or built a HASPone, [now it's time to make it talk to Home Assistant](https://github.com/HASwitchPlate/HASPone/wiki/Configure-your-HASPone-for-Home-Assistant)
|
If you're purchased or built a HASPone, [now it's time to make it talk to Home Assistant](https://github.com/HASwitchPlate/HASPone/wiki/Configure-your-HASPone-for-Home-Assistant).
|
||||||
|
|
||||||
|
Here's a quick look at the setup process:
|
||||||
|
|
||||||
|
[](https://youtu.be/zi784hr69QA)
|
||||||
|
|
||||||
## Have a question?
|
## Have a question?
|
||||||
|
|
||||||
|
BIN
images/HASPone_core_functionality_blueprint_YouTube.png
Normal file
BIN
images/HASPone_core_functionality_blueprint_YouTube.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
BIN
images/HASPone_first_time_setup_YouTube.png
Normal file
BIN
images/HASPone_first_time_setup_YouTube.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"d1_mini": {
|
"d1_mini": {
|
||||||
"version": "1.00",
|
"version": "1.02",
|
||||||
"firmware": "https://raw.githubusercontent.com/HASwitchPlate/HASPone/main/Arduino_Sketch/HASwitchPlate.ino.d1_mini.bin"
|
"firmware": "https://raw.githubusercontent.com/HASwitchPlate/HASPone/main/Arduino_Sketch/HASwitchPlate.ino.d1_mini.bin"
|
||||||
},
|
},
|
||||||
"NX3224T024_011R": {
|
"NX3224T024_011R": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user