Provide default for filters for 2021.12, add ad-hoc version

This commit is contained in:
aderusha 2021-11-10 11:26:50 -05:00
parent 795452b6c6
commit eb346e37fd
30 changed files with 449 additions and 399 deletions

View File

@ -106,26 +106,6 @@ Page 8 controls a selected media player with artist and track info, track back/p
--- ---
### Display Temperature with Colored Icon Only
[![Display Temperature with Colored Icon Only](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FHASwitchPlate%2FHASPone%2Fblob%2Fmain%2FHome_Assistant%2Fblueprints%2Fhasp_Display_Temperature_Color_Icon_Only.yaml)
![Preview](https://raw.githubusercontent.com/HASwitchPlate/HASPone/main/images/hasp_Display_Temperature_Color_Icon_Only.png)
A HASP button displays the current temperature as an icon that is optionally coloured.
---
### Display Temperature with Icon and Colors
[![Display Temperature with Icon and Colors](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FHASwitchPlate%2FHASPone%2Fblob%2Fmain%2FHome_Assistant%2Fblueprints%2Fhasp_Display_Temperature_with_Icon_and_Colors.yaml)
![Preview](https://raw.githubusercontent.com/HASwitchPlate/HASPone/main/images/hasp_Display_Temperature_with_Icon_and_Colors.png)
A HASP button displays the current temperature from a selected weather provider on the right with a dynamic thermometer icon on the left and (optional) colors.
---
### Display Template ### Display Template
[![Display Template](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FHASwitchPlate%2FHASPone%2Fblob%2Fmain%2FHome_Assistant%2Fblueprints%2Fhasp_Display_Template.yaml) [![Display Template](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FHASwitchPlate%2FHASPone%2Fblob%2Fmain%2FHome_Assistant%2Fblueprints%2Fhasp_Display_Template.yaml)
@ -186,6 +166,26 @@ A HASP button displays an attribute of a selected weather forecast. You can use
--- ---
### Display Weather Temperature with Colored Icon Only
[![Display Weather Temperature with Colored Icon Only](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FHASwitchPlate%2FHASPone%2Fblob%2Fmain%2FHome_Assistant%2Fblueprints%2Fhasp_Display_Weather_Temperature_Color_Icon_Only.yaml)
![Preview](https://raw.githubusercontent.com/HASwitchPlate/HASPone/main/images/hasp_Display_Weather_Temperature_Color_Icon_Only.png)
A HASP button displays the current temperature as an icon that is optionally coloured.
---
### Display Weather Temperature with Icon and Colors
[![Display Weather Temperature with Icon and Colors](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FHASwitchPlate%2FHASPone%2Fblob%2Fmain%2FHome_Assistant%2Fblueprints%2Fhasp_Display_Weather_Temperature_with_Icon_and_Colors.yaml)
![Preview](https://raw.githubusercontent.com/HASwitchPlate/HASPone/main/images/hasp_Display_Weather_Temperature_with_Icon_and_Colors.png)
A HASP button displays the current temperature from a selected weather provider on the right with a dynamic thermometer icon on the left and (optional) colors.
---
### Perform Action ### Perform Action
[![Perform Action](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FHASwitchPlate%2FHASPone%2Fblob%2Fmain%2FHome_Assistant%2Fblueprints%2Fhasp_Perform_Action.yaml) [![Perform Action](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FHASwitchPlate%2FHASPone%2Fblob%2Fmain%2FHome_Assistant%2Fblueprints%2Fhasp_Perform_Action.yaml)

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] activates a page" name: "HASP p[x].b[y] activates a page"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A button on the HASP will activate a page when pressed. Can be combined on a button with another blueprint which displays text. A button on the HASP will activate a page when pressed. Can be combined on a button with another blueprint which displays text.

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP activates a selected page after a specified period of inactivity" name: "HASP activates a selected page after a specified period of inactivity"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
Activates a selected page after a specified period of inactivity. Activates a selected page after a specified period of inactivity.
@ -79,7 +81,7 @@ variables:
{%- set activepage.entity=entity -%} {%- set activepage.entity=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %} {{ states(activepage.entity) | int(default=-1) }}
trigger_variables: trigger_variables:
haspdevice: !input haspdevice haspdevice: !input haspdevice

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] has theme colors applied" name: "HASP p[x].b[y] has theme colors applied"
description: | description: |
## Blueprint Version: `1.03.00`
## Description ## Description
A button on the HASP will have the current device theme or custom colors applied. A button on the HASP will have the current device theme or custom colors applied.
@ -149,10 +151,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
{%- endif -%} {%- endif -%}
selectedbg: >- selectedbg: >-
@ -165,10 +167,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
{%- endif -%} {%- endif -%}
unselectedfg: >- unselectedfg: >-
@ -181,10 +183,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
{%- endif -%} {%- endif -%}
unselectedbg: >- unselectedbg: >-
@ -197,10 +199,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
{%- endif -%} {%- endif -%}

View File

@ -2,7 +2,7 @@ blueprint:
name: "HASP Core functionality" name: "HASP Core functionality"
description: | description: |
## Blueprint Version: `1.02` ## Blueprint Version: `1.03.00`
## Description ## Description
@ -250,7 +250,7 @@ variables:
{%- set activepage.entity=entity -%} {%- set activepage.entity=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %} {{ states(activepage.entity) | int(default=-1) }}
statetopic: '{{ "hasp/" ~ haspname ~ "/state" }}' statetopic: '{{ "hasp/" ~ haspname ~ "/state" }}'
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}' jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
jsoncommandtopic: '{{ "hasp/" ~ haspname ~ "/command/json" }}' jsoncommandtopic: '{{ "hasp/" ~ haspname ~ "/command/json" }}'
@ -569,10 +569,10 @@ action:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|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 -%} [{%- 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 -%} {%- else -%}{%- for p in range(1,12) %}"p[{{p}}].b[1].pco2={{colorcode}}",{%- endfor -%}{%- endif -%}
@ -589,10 +589,10 @@ action:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|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 -%} [{%- 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 -%} {% else %}{%- for p in range(1,12) %}"p[{{p}}].b[1].bco2={{colorcode}}",{%- endfor -%}{%- endif -%}
@ -609,10 +609,10 @@ action:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|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 -%} [{%- 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 -%} {% else %}{%- for p in range(1,12) %}"p[{{p}}].b[1].pco={{colorcode}}",{%- endfor -%}{%- endif -%}
@ -629,10 +629,10 @@ action:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|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 -%} [{%- 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 -%} {% else %}{%- for p in range(1,12) %}"p[{{p}}].b[1].bco={{colorcode}}",{%- endfor -%}{%- endif -%}
@ -668,10 +668,10 @@ action:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|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 -%} [{%- 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 -%} {%- else -%}{%- for p in range(1,12) %}"p[{{p}}].b[1].pco2={{colorcode}}",{%- endfor -%}{%- endif -%}
@ -688,10 +688,10 @@ action:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|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 -%} [{%- 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 -%} {% else %}{%- for p in range(1,12) %}"p[{{p}}].b[1].bco2={{colorcode}}",{%- endfor -%}{%- endif -%}
@ -708,10 +708,10 @@ action:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|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 -%} [{%- 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 -%} {% else %}{%- for p in range(1,12) %}"p[{{p}}].b[1].pco={{colorcode}}",{%- endfor -%}{%- endif -%}
@ -728,10 +728,10 @@ action:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|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 -%} [{%- 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 -%} {% else %}{%- for p in range(1,12) %}"p[{{p}}].b[1].bco={{colorcode}}",{%- endfor -%}{%- endif -%}

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP create device triggers" name: "HASP create device triggers"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
Create [Device Triggers](https://www.home-assistant.io/integrations/device_trigger.mqtt/) for each of the HASP buttons defined below. Device triggers can be utilized while creating your own automations through the Home Assistant UI. Create [Device Triggers](https://www.home-assistant.io/integrations/device_trigger.mqtt/) for each of the HASP buttons defined below. Device triggers can be utilized while creating your own automations through the Home Assistant UI.

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] cycles through multiple automations" name: "HASP p[x].b[y] cycles through multiple automations"
description: | description: |
## Blueprint Version: `1.03.00`
## Description ## Description
A button on the HASP will toggle through as many as 10 selected automations. This allows the user to assign multiple blueprints to the same button on the HASPone device, and to cycle between them by pressing the selected button. A button on the HASP will toggle through as many as 10 selected automations. This allows the user to assign multiple blueprints to the same button on the HASPone device, and to cycle between them by pressing the selected button.

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP dim the display screen after a specified period of inactivity" name: "HASP dim the display screen after a specified period of inactivity"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
Dim the screen backlight after a specified period of inactivity. Dim the screen backlight after a specified period of inactivity.

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP dims the backlight with the sun" name: "HASP dims the backlight with the sun"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
Dim the HASPone backlight in response to the sun going up and down. Dim the HASPone backlight in response to the sun going up and down.
@ -91,9 +93,9 @@ condition:
- condition: template - condition: template
value_template: "{{ is_state(haspsensor, 'ON') }}" value_template: "{{ is_state(haspsensor, 'ON') }}"
- condition: template - condition: template
value_template: "{{ state_attr('sun.sun', 'elevation') | round <= elevationday }}" value_template: "{{ state_attr('sun.sun', 'elevation') | round(default=90) <= elevationday }}"
- condition: template - condition: template
value_template: "{{ state_attr('sun.sun', 'elevation') | round >= elevationnight }}" value_template: "{{ state_attr('sun.sun', 'elevation') | round(default=-90) >= elevationnight }}"
action: action:
- choose: - choose:
@ -101,7 +103,7 @@ action:
# Sun elevation is approximately equal to or greater than daytime value, send brightday # Sun elevation is approximately equal to or greater than daytime value, send brightday
- conditions: - conditions:
- condition: template - condition: template
value_template: "{{ state_attr('sun.sun', 'elevation') | round >= elevationday }}" value_template: "{{ state_attr('sun.sun', 'elevation') | round(default=0) >= elevationday }}"
sequence: sequence:
- service: mqtt.publish - service: mqtt.publish
data: data:
@ -111,7 +113,7 @@ action:
# Sun elevation is approximately equal to or less than nighttime value, send brightnight # Sun elevation is approximately equal to or less than nighttime value, send brightnight
- conditions: - conditions:
- condition: template - condition: template
value_template: "{{ state_attr('sun.sun', 'elevation') | round <= elevationnight }}" value_template: "{{ state_attr('sun.sun', 'elevation') | round(default=0) <= elevationnight }}"
sequence: sequence:
- service: mqtt.publish - service: mqtt.publish
data: data:
@ -123,4 +125,4 @@ action:
- service: mqtt.publish - service: mqtt.publish
data: data:
topic: "{{ lightcommandtopic }}" topic: "{{ lightcommandtopic }}"
payload: "{{ (brightnight + ((brightday - brightnight) / (elevationday - elevationnight)) * (state_attr('sun.sun', 'elevation') - elevationnight)) | round | int }}" payload: "{{ (brightnight + ((brightday - brightnight) / (elevationday - elevationnight)) * (state_attr('sun.sun', 'elevation') - elevationnight)) | round(default=0) | int }}"

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[7].b[all] displays an alarm control panel" name: "HASP p[7].b[all] displays an alarm control panel"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
Page 7 controls a selected alarm panel for code entry and arm/disarm. Page 7 controls a selected alarm panel for code entry and arm/disarm.
@ -120,10 +122,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -132,10 +134,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -144,10 +146,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -156,10 +158,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
b13text: >- b13text: >-

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays the month + date with a calendar icon" name: "HASP p[x].b[y] displays the month + date with a calendar icon"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A HASP button displays month + date on the right with a calendar icon on the left. A HASP button displays month + date on the right with a calendar icon on the left.
@ -79,7 +81,7 @@ variables:
{%- set activepage.entity=entity -%} {%- set activepage.entity=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %} {{ states(activepage.entity) | int(default=-1) }}
selectedfg: >- selectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
{%- for entity in device_entities(haspdevice) -%} {%- for entity in device_entities(haspdevice) -%}
@ -87,10 +89,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -99,10 +101,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -111,10 +113,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -123,10 +125,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
text: '{{(now().strftime("%b "))~now().day}}' text: '{{(now().strftime("%b "))~now().day}}'
font: 8 font: 8

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays a clock" name: "HASP p[x].b[y] displays a clock"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A HASP button displays a clock with configurable text options. A HASP button displays a clock with configurable text options.
@ -189,10 +191,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -201,10 +203,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -213,10 +215,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -225,10 +227,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
trigger_variables: trigger_variables:

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays a clock with a clock icon" name: "HASP p[x].b[y] displays a clock with a clock icon"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A HASP button displays a clock on the right with a clock icon on the left. A HASP button displays a clock on the right with a clock icon on the left.
@ -81,7 +83,7 @@ variables:
{%- set activepage.entity=entity -%} {%- set activepage.entity=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %} {{ states(activepage.entity) | int(default=-1) }}
selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}' selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}'
selectedbgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedbackgroundcolor/rgb" }}' selectedbgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedbackgroundcolor/rgb" }}'
unselectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/unselectedforegroundcolor/rgb" }}' unselectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/unselectedforegroundcolor/rgb" }}'
@ -93,10 +95,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -105,10 +107,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -117,10 +119,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -129,10 +131,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
text: '{%- if hour24 == true -%}{%- set hourformat="%-H" -%}{%- else %}{%- set hourformat="%I" -%}{%- endif -%}{{(now().strftime(hourformat)|int)~now().strftime(":%M")}}' text: '{%- if hour24 == true -%}{%- set hourformat="%-H" -%}{%- else %}{%- set hourformat="%I" -%}{%- endif -%}{{(now().strftime(hourformat)|int)~now().strftime(":%M")}}'
font: 10 font: 10

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays a dimmer with a toggle on/off icon" name: "HASP p[x].b[y] displays a dimmer with a toggle on/off icon"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A HASP button displays a dimmer control on page 4 and 5 with a toggle on/off icon to the left. A HASP button displays a dimmer control on page 4 and 5 with a toggle on/off icon to the left.
@ -166,7 +168,7 @@ variables:
{%- set activepage.entity=entity -%} {%- set activepage.entity=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %} {{ states(activepage.entity) | int(default=-1) }}
selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}' selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}'
selectedbgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedbackgroundcolor/rgb" }}' selectedbgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedbackgroundcolor/rgb" }}'
unselectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/unselectedforegroundcolor/rgb" }}' unselectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/unselectedforegroundcolor/rgb" }}'
@ -178,10 +180,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -190,10 +192,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -202,10 +204,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -214,10 +216,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
ypos: "{{(haspbutton|int - 7) * 90 + 32}}" # calculate the top pixel position based on the selected button ypos: "{{(haspbutton|int - 7) * 90 + 32}}" # calculate the top pixel position based on the selected button

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays the state or attribute value of an entity" name: "HASP p[x].b[y] displays the state or attribute value of an entity"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A HASP button displays the state or attribute value of an entity A HASP button displays the state or attribute value of an entity
@ -242,10 +244,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -254,10 +256,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -266,10 +268,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -278,10 +280,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
trigger_variables: trigger_variables:

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[6].b[all] Page 6 displays Heatpump controls" name: "HASP p[6].b[all] Page 6 displays Heatpump controls"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
Page 6 controls a Heatpump. Display target and mode. Change temperature and mode Page 6 controls a Heatpump. Display target and mode. Change temperature and mode
@ -152,10 +154,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -164,10 +166,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -176,10 +178,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -188,10 +190,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
hp_is_heat: "{{is_state(heatpump, 'heat') }}" hp_is_heat: "{{is_state(heatpump, 'heat') }}"
@ -218,13 +220,13 @@ variables:
tgttemp: >- tgttemp: >-
{%- if roundtemp == true -%} {%- if roundtemp == true -%}
{{- state_attr(heatpump,'temperature')| round -}} {{- state_attr(heatpump,'temperature')| round(default=0) -}}
{%- else -%} {%- else -%}
{{- state_attr(heatpump,'temperature') -}} {{- state_attr(heatpump,'temperature') -}}
{%- endif -%} {%- endif -%}
currtemp: >- currtemp: >-
{%- if roundtemp == true -%} {%- if roundtemp == true -%}
{{- state_attr(heatpump,'current_temperature')| round -}} {{- state_attr(heatpump,'current_temperature')| round(default=0) -}}
{%- else -%} {%- else -%}
{{- state_attr(heatpump,'current_temperature') -}} {{- state_attr(heatpump,'current_temperature') -}}
{%- endif -%} {%- endif -%}

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[9].b[all] Page 9 displays Heatpump controls" name: "HASP p[9].b[all] Page 9 displays Heatpump controls"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
Page 9 controls a Heatpump. Display target and mode. Change temperature and mode Page 9 controls a Heatpump. Display target and mode. Change temperature and mode
@ -152,10 +154,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -164,10 +166,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -176,10 +178,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -188,10 +190,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
hp_is_heat: "{{is_state(heatpump, 'heat') }}" hp_is_heat: "{{is_state(heatpump, 'heat') }}"
@ -219,13 +221,13 @@ variables:
tgttemp: >- tgttemp: >-
{%- if roundtemp == true -%} {%- if roundtemp == true -%}
{{- state_attr(heatpump,'temperature')| round -}} {{- state_attr(heatpump,'temperature')| round(default=0) -}}
{%- else -%} {%- else -%}
{{- state_attr(heatpump,'temperature') -}} {{- state_attr(heatpump,'temperature') -}}
{%- endif -%} {%- endif -%}
currtemp: >- currtemp: >-
{%- if roundtemp == true -%} {%- if roundtemp == true -%}
{{- state_attr(heatpump,'current_temperature')| round -}} {{- state_attr(heatpump,'current_temperature')| round(default=0) -}}
{%- else -%} {%- else -%}
{{- state_attr(heatpump,'current_temperature') -}} {{- state_attr(heatpump,'current_temperature') -}}
{%- endif -%} {%- endif -%}

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[8].b[all] Page 8 displays media controls" name: "HASP p[8].b[all] Page 8 displays media controls"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
Page 8 controls a selected media player with artist and track info, track back/play|pause/track forward, and volume control Page 8 controls a selected media player with artist and track info, track back/play|pause/track forward, and volume control
@ -85,10 +87,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -97,10 +99,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -109,10 +111,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -121,18 +123,16 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
volume: "{% if state_attr(mediaplayer, 'volume_level')|lower == 'none' %}0{% else %}{{(state_attr(mediaplayer, 'volume_level')*255)|int}}{% endif %}" volume: "{{(state_attr(mediaplayer, 'volume_level') | float(default=0) * 255)|int}}"
button4text: "{% if state_attr(mediaplayer, button4attribute)|lower == 'none' %}{% else %}{{state_attr(mediaplayer, button4attribute)|wordwrap(19, wrapstring='\\\\r')}}{% endif %}" button4text: "{% if state_attr(mediaplayer, button4attribute) is none %}{% else %}{{state_attr(mediaplayer, button4attribute)|wordwrap(19, wrapstring='\\\\r')}}{% endif %}"
# button4text: '{{state_attr(mediaplayer, button4attribute)|wordwrap(19, wrapstring="\\\\r")}}'
button4font: "{% set attr_length = button4text|safe|length%}{% if attr_length <= 6 -%}9{% elif attr_length <= 8 %}8{% elif attr_length <= 10 %}7{% else %}6{%- endif %}" button4font: "{% set attr_length = button4text|safe|length%}{% if attr_length <= 6 -%}9{% elif attr_length <= 8 %}8{% elif attr_length <= 10 %}7{% else %}6{%- endif %}"
button5text: "{% if state_attr(mediaplayer, button5attribute)|lower == 'none' %}{% else %}{{state_attr(mediaplayer, button5attribute)|wordwrap(19, wrapstring='\\\\r')}}{% endif %}" button5text: "{% if state_attr(mediaplayer, button5attribute) is none %}{% else %}{{state_attr(mediaplayer, button5attribute)|wordwrap(19, wrapstring='\\\\r')}}{% endif %}"
# button5text: '{{state_attr(mediaplayer, button5attribute)|wordwrap(19, wrapstring="\\\\r")}}'
button5font: "{% set attr_length = button5text|safe|length%}{% if attr_length <= 6 -%}9{% elif attr_length <= 8 %}8{% elif attr_length <= 10 %}7{% else %}6{%- endif %}" button5font: "{% set attr_length = button5text|safe|length%}{% if attr_length <= 6 -%}9{% elif attr_length <= 8 %}8{% elif attr_length <= 10 %}7{% else %}6{%- endif %}"
button6text: "" # prev track button6text: "" # prev track
button6font: 8 button6font: 8

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays the output of a template" name: "HASP p[x].b[y] displays the output of a template"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A button on the HASP will display the output of a template. The template is updated when the state of a selected entity updates. A button on the HASP will display the output of a template. The template is updated when the state of a selected entity updates.
@ -15,7 +17,7 @@ blueprint:
### Show tomorrow's high/low temperature from Met.no ### Show tomorrow's high/low temperature from Met.no
**Trigger entity:** The default Met.no provider from Home Assistant. If you left your location named "Home", the entity should be `weather.home` **Trigger entity:** The default Met.no provider from Home Assistant. If you left your location named "Home", the entity should be `weather.home`
**Template:** `Tomorrow\\rHigh: {{state_attr(trigger_entity, "forecast")[0].temperature|int}} Low: {{state_attr(trigger_entity, "forecast")[0].templow|int}}` **Template:** `Tomorrow\\rHigh: {{state_attr(trigger_entity, "forecast")[0].temperature|int(default=0)}} Low: {{state_attr(trigger_entity, "forecast")[0].templow|int(default=0)}}`
**Font:** `6` **Font:** `6`
</details> </details>
@ -193,10 +195,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -205,10 +207,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -217,10 +219,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -229,10 +231,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
trigger_variables: trigger_variables:

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays text" name: "HASP p[x].b[y] displays text"
description: | description: |
## Blueprint Version: `1.03.00`
## Description ## Description
A button on the HASP will display text. This can be useful when combined with other blueprints which perform an action, but don't apply a label to a button. A button on the HASP will display text. This can be useful when combined with other blueprints which perform an action, but don't apply a label to a button.
@ -241,10 +243,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
{%- endif -%} {%- endif -%}
selectedbg: >- selectedbg: >-
@ -257,10 +259,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
{%- endif -%} {%- endif -%}
unselectedfg: >- unselectedfg: >-
@ -273,10 +275,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
{%- endif -%} {%- endif -%}
unselectedbg: >- unselectedbg: >-
@ -289,10 +291,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
{%- endif -%} {%- endif -%}

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays a toggle button" name: "HASP p[x].b[y] displays a toggle button"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
Press a button on the HASP to toggle the state of an entity. The button colors and text can change in response to the on/off state or attribute of the selected entity. Press a button on the HASP to toggle the state of an entity. The button colors and text can change in response to the on/off state or attribute of the selected entity.
@ -314,10 +316,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -326,10 +328,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -338,10 +340,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -350,10 +352,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
entity_attribute: '{% if attribute|lower == "state" %}{{states(entity)}}{% else %}{{state_attr(entity,attribute)}}{% endif %}' entity_attribute: '{% if attribute|lower == "state" %}{{states(entity)}}{% else %}{{state_attr(entity,attribute)}}{% endif %}'
entity_state: "{% if entity_attribute|lower == state_on %}{{true}}{% else %}{{false}}{% endif %}" entity_state: "{% if entity_attribute|lower == state_on %}{{true}}{% else %}{{false}}{% endif %}"

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[8].b[9] The slider button on page 8 displays a volume control" name: "HASP p[8].b[9] The slider button on page 8 displays a volume control"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
The slider button on page 8 displays a volume control The slider button on page 8 displays a volume control
@ -64,10 +66,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -76,12 +78,12 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
volume: '{% if state_attr(volumeentity, "volume_level")|lower == "none" %}0{% else %}{{(state_attr(volumeentity, "volume_level")*255)|int}}{% endif %}' volume: '{{(state_attr(volumeentity, "volume_level")|float(default=0)*255)|int}}'
trigger_variables: trigger_variables:
haspdevice: !input haspdevice haspdevice: !input haspdevice
@ -173,7 +175,7 @@ action:
- service: media_player.volume_set - service: media_player.volume_set
entity_id: !input volumeentity entity_id: !input volumeentity
data: data:
volume_level: "{{ (trigger.payload | int) / 255 }}" volume_level: "{{ (trigger.payload | int(default=0)) / 255 }}"
######################################################################### #########################################################################
# Theme: Apply unselected foreground color on change # Theme: Apply unselected foreground color on change
- conditions: - conditions:

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays the current weather condition" name: "HASP p[x].b[y] displays the current weather condition"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A HASP button displays the current weather condition A HASP button displays the current weather condition
@ -177,10 +179,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -189,10 +191,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -201,10 +203,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -213,10 +215,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
trigger_variables: trigger_variables:

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays the current weather condition icon only" name: "HASP p[x].b[y] displays the current weather condition icon only"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A HASP button displays the current weather condition icon only A HASP button displays the current weather condition icon only
@ -147,7 +149,7 @@ variables:
{%- set activepage.entity=entity -%} {%- set activepage.entity=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %} {{ states(activepage.entity) | int(default=-1) }}
selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}' selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}'
selectedbgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedbackgroundcolor/rgb" }}' selectedbgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedbackgroundcolor/rgb" }}'
unselectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/unselectedforegroundcolor/rgb" }}' unselectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/unselectedforegroundcolor/rgb" }}'
@ -159,10 +161,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -171,10 +173,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -183,10 +185,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -195,10 +197,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
trigger_variables: trigger_variables:

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays the current weather condition with icons" name: "HASP p[x].b[y] displays the current weather condition with icons"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A HASP button displays the current weather condition on the right with a matching icon on the left A HASP button displays the current weather condition on the right with a matching icon on the left
@ -147,7 +149,7 @@ variables:
{%- set activepage.entity=entity -%} {%- set activepage.entity=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %} {{ states(activepage.entity) | int(default=-1) }}
selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}' selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}'
selectedbgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedbackgroundcolor/rgb" }}' selectedbgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedbackgroundcolor/rgb" }}'
unselectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/unselectedforegroundcolor/rgb" }}' unselectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/unselectedforegroundcolor/rgb" }}'
@ -159,10 +161,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -171,10 +173,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -183,10 +185,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -195,10 +197,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
trigger_variables: trigger_variables:

View File

@ -2,6 +2,8 @@ blueprint:
name: "HASP p[x].b[y] displays the weather forecast" name: "HASP p[x].b[y] displays the weather forecast"
description: | description: |
## Blueprint Version: `1.03.00`
## Description ## Description
A HASP button displays an attribute of a selected weather forecast. You can use this to display tomorrow's condition, or tonight's low temp. A HASP button displays an attribute of a selected weather forecast. You can use this to display tomorrow's condition, or tonight's low temp.
@ -200,9 +202,9 @@ variables:
{{ prefix }} {{ prefix }}
{%- endif -%} {%- endif -%}
{%- if title_case -%} {%- if title_case -%}
{{ state_attr(weather_provider, "forecast")[forecast_index|int].get(forecast_attribute) | title }} {{ state_attr(weather_provider, "forecast")[forecast_index|int(default=0)].get(forecast_attribute) | title }}
{%- else -%} {%- else -%}
{{ state_attr(weather_provider, "forecast")[forecast_index|int].get(forecast_attribute) }} {{ state_attr(weather_provider, "forecast")[forecast_index|int(default=0)].get(forecast_attribute) }}
{%- endif -%} {%- endif -%}
isbr: "{% if wrap == true %}1{% else %}0{% endif %}" isbr: "{% if wrap == true %}1{% else %}0{% endif %}"
selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}' selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}'
@ -216,10 +218,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -228,10 +230,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -240,10 +242,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -252,10 +254,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
trigger_variables: trigger_variables:

View File

@ -1,12 +1,14 @@
blueprint: blueprint:
name: "HASP p[x].b[y] displays the current temperature, coloured icon only" name: "HASP p[x].b[y] displays the current temperature from a weather provider, coloured icon only"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A HASP button displays the current temperature as an icon that is optionally coloured. A HASP button displays the current temperature from a weather provider as an icon that is optionally coloured.
![Preview](https://raw.githubusercontent.com/HASwitchPlate/HASPone/main/images/hasp_Display_Temperature_Color_Icon_Only.png) ![Preview](https://raw.githubusercontent.com/HASwitchPlate/HASPone/main/images/hasp_Display_Weather_Temperature_Color_Icon_Only.png)
## HASP Page and Button reference ## HASP Page and Button reference
@ -225,10 +227,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -237,10 +239,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -249,10 +251,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -261,10 +263,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
tempcolor: >- tempcolor: >-
{%- set temp = temperature|int -%} {%- set temp = temperature|int -%}

View File

@ -1,12 +1,14 @@
blueprint: blueprint:
name: "HASP p[x].b[y] displays the current weather temperature with icon and colors" name: "HASP p[x].b[y] displays the current temperature from a weather provider with icon and colors"
description: | description: |
## Blueprint Version: `1.03.00`
# Description # Description
A HASP button displays the current weather temperature on the right with a dynamic thermometer icon on the left and (optional) colors. A HASP button displays the current temperature from a weather provider on the right with a dynamic thermometer icon on the left and (optional) colors.
![Preview](https://raw.githubusercontent.com/HASwitchPlate/HASPone/main/images/hasp_Display_Temperature_with_Icon_and_Colors.png) ![Preview](https://raw.githubusercontent.com/HASwitchPlate/HASPone/main/images/hasp_Display_Weather_Temperature_with_Icon_and_Colors.png)
## HASP Page and Button reference ## HASP Page and Button reference
@ -220,7 +222,7 @@ variables:
jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}' jsontopic: '{{ "hasp/" ~ haspname ~ "/state/json" }}'
temperature: >- temperature: >-
{%- if roundtemp == true -%} {%- if roundtemp == true -%}
{{- state_attr(weather_provider, "temperature") | round -}} {{- state_attr(weather_provider, "temperature") | round(default=0) -}}
{%- else -%} {%- else -%}
{{- state_attr(weather_provider, "temperature") -}} {{- state_attr(weather_provider, "temperature") -}}
{%- endif -%} {%- endif -%}
@ -254,7 +256,7 @@ variables:
{%- set activepage.entity=entity -%} {%- set activepage.entity=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{% if states(activepage.entity)|lower == "none" %}-1{% else %}{{ states(activepage.entity) | int }}{% endif %} {{ states(activepage.entity) | int(default=-1) }}
selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}' selectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedforegroundcolor/rgb" }}'
selectedbgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedbackgroundcolor/rgb" }}' selectedbgtopic: '{{ "hasp/" ~ haspname ~ "/light/selectedbackgroundcolor/rgb" }}'
unselectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/unselectedforegroundcolor/rgb" }}' unselectedfgtopic: '{{ "hasp/" ~ haspname ~ "/light/unselectedforegroundcolor/rgb" }}'
@ -266,10 +268,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
selectedbg: >- selectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -278,10 +280,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedfg: >- unselectedfg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -290,10 +292,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
unselectedbg: >- unselectedbg: >-
{%- set color = namespace() -%} {%- set color = namespace() -%}
@ -302,10 +304,10 @@ variables:
{%- set color.source=entity -%} {%- set color.source=entity -%}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set brightness = state_attr(color.source, "brightness")|int(default=255) / 255 -%}
{%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int(default=0) -%}
{%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int(default=0) -%}
{%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int(default=0) -%}
{{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}
tempcolor: >- tempcolor: >-
{%- set temp = temperature|int -%} {%- set temp = temperature|int -%}

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB