-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- update mobile high accuracy automations - update low battery alert message - update binary_sensor.jason_phone_connected - add alert.jinja custom template file - update custom templates - disable bluetooth
- Loading branch information
Showing
47 changed files
with
297 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{%- macro alert_switch(entity) -%} | ||
{%- set active_alert = states.alert | selectattr('attributes.category', 'eq', | ||
states[entity].object_id | replace('_alerts', '')) | selectattr('state', 'ne', 'idle') | ||
| list | count > 0 if states[entity] != none else false -%} | ||
:host { | ||
--paper-item-icon-color: | ||
{%- if active_alert %} var(--entity-severe-color) | ||
{%- elif is_state(entity, 'off') %} var(--entity-warning-color) | ||
{%- else %} var(--state-icon-color) | ||
{%- endif -%} | ||
; | ||
--state-active-color: | ||
{%- if active_alert %} var(--entity-severe-color) | ||
{%- else %} var(--state-active-color) | ||
{%- endif -%} | ||
; | ||
--switch-unchecked-button-color: var(--entity-warning-color); | ||
--switch-unchecked-track-color: var(--entity-warning-color); | ||
} | ||
{%- endmacro -%} | ||
|
||
{%- macro alert_entities(category) -%} | ||
{{ states.alert | selectattr('attributes.category', 'eq', category) | map(attribute='entity_id') | list }} | ||
{%- endmacro -%} | ||
|
||
{%- macro alert_zero_style(entity) -%} | ||
:host { | ||
--paper-item-icon-color: | ||
{%- set state = states(entity) | int(-1) %} | ||
{%- if state < 0 %} var(--entity-disabled-color) | ||
{%- elif state == 0 %} var(--entity-warning-color) | ||
{%- else %} var(--state-icon-color) | ||
{%- endif -%} | ||
; | ||
} | ||
{%- endmacro -%} | ||
|
||
{%- macro alert_non_zero_style(entity) -%} | ||
:host { | ||
--paper-item-icon-color: | ||
{%- set state = states(entity) | int(-1) %} | ||
{%- if state < 0 %} var(--entity-disabled-color) | ||
{%- elif state == 0 %} var(--state-icon-color) | ||
{%- else %} var(--entity-warning-color) | ||
{%- endif -%} | ||
; | ||
} | ||
{%- endmacro -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.