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
#!/usr/bin/env bash | |
# Setup script environment | |
set -o errexit #Exit immediately if a pipeline returns a non-zero status | |
set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell | |
set -o nounset #Treat unset variables as an error | |
set -o pipefail #Pipe will exit with last non-zero status if applicable | |
shopt -s expand_aliases | |
alias die='EXIT=$? LINE=$LINENO error_exit' | |
trap die ERR |
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
{% set mystates = states|selectattr('entity_id', 'in', state_attr('light.all', 'entity_id')) |selectattr('state', 'equalto', 'on') | list %} | |
{% set names = mystates | map(attribute='name') | list %} | |
{% set times = mystates | map(attribute='last_updated') | list %} | |
{% for i in range(mystates | length) %} | |
{{ names[i] }} depuis ( {{ as_timestamp(times[i])|timestamp_custom("%Hh:%M") }} ), | |
{%- endfor %} |
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
--- | |
automation: | |
- alias: "[System] - Chargement Tablette" | |
trigger: | |
- platform: numeric_state | |
entity_id: sensor.tablette_info | |
attribute: batteryLevel | |
above: 0 | |
below: 6 | |
- platform: state |
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
- alias: "[System] - Heure Reveil" | |
trigger: | |
platform: time | |
at: input_datetime.heure_reveil_avant_A | |
action: | |
- service: hommeassistant.toggle | |
data: | |
entity_id: switch.monchauffage | |
- alias: "[System] - Modification de l'input_datetime heure_reveil_avant_A" |
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
- alias: "ShellyButton Simple" | |
trigger: | |
- platform: state | |
entity_id: binary_sensor.shelly_shbtn_1_*******_switch | |
to: "on" | |
condition: | |
condition: template | |
value_template: "{{ state_attr('binary_sensor.shelly_shbtn_1_*******_switch', 'click_type') == 'single' }}" | |
action: | |
#### WHAT YOU WANT #### |
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
--- | |
automation: | |
- alias: "[System] - Heure Reveil PERSONNE 1" | |
trigger: | |
platform: state | |
entity_id: sensor.telephone_next_alarm | |
for: "00:00:15" | |
action: | |
- choose: | |
- conditions: > |