This file contains hidden or 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
| template: | |
| - sensor: | |
| - name: Glucose Level | |
| state: > | |
| {% set x = states('sensor.XXXXX_last_notification') %} | |
| {{ x.rsplit(' ')|select('is_number') | first }} | |
| availability: > | |
| {% set x = states('sensor.XXXXX_last_notification') %} | |
| {{ x.rsplit(' ')|select('is_number') | first is defined }} |
This file contains hidden or 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: Mobile - Drews Phone - Vibrate | |
| description: "" | |
| trigger: | |
| - platform: state | |
| to: Work | |
| condition: [] | |
| action: | |
| - alias: Switch to vibrate | |
| service: notify.mobile_app_dj | |
| data: |
This file contains hidden or 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
| template: | |
| - trigger: | |
| - platform: homeassistant | |
| event: start | |
| - platform: time | |
| at: "00:00:01" | |
| sensor: | |
| - name: "New Years Day" | |
| unique_id: "37319374975705055206" | |
| state: > |
This file contains hidden or 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 doors = ['sensor.broadlink_s1c_porta_da_cozinha', | |
| 'sensor.broadlink_s1c_porta_da_entrada', 'sensor.broadlink_s1c_porta_do_escritorio', | |
| 'sensor.broadlink_s1c_garagem'] %} | |
| {% set open_doors = expand(doors) | |
| | selectattr('state','eq','open') | | |
| map(attribute='entity_id') | map('area_name') | |
| | unique | reject('eq',None) | sort | map('lower') | list %} | |
| {% set d_qty = open_doors | count %} | |
| {% if d_qty != 0 %} | |
| {{'Há uma porta' if d_qty==1 else 'Há '~d_qty~' portas'}} aberta{{' ' if d_qty==1 |
This file contains hidden or 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: FOFO | |
| description: First-On, First Off | |
| variables: | |
| max_on: 3 | |
| ent_list: | |
| - input_boolean.test_bool_1 | |
| - input_boolean.test_bool_2 | |
| - input_boolean.test_bool_3 | |
| - input_boolean.test_bool_4 | |
| trigger: |
This file contains hidden or 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: Heating Schedule | |
| description: "" | |
| mode: single | |
| trigger: | |
| - platform: state | |
| entity_id: | |
| - schedule.during_school_heat_10 | |
| - schedule.morning_night_heat_12 | |
| - schedule.after_school_heat_14 | |
| to: "on" |
This file contains hidden or 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
| ################################## | |
| ####### Basic Version ########### | |
| ################################## | |
| #### template sensor #### | |
| - name: "HVAC Current Set Point" | |
| state: > | |
| {% set a = today_at("6:00")%} |
This file contains hidden or 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 pollens = states.sensor|selectattr('entity_id', 'search', 'pollen_0d')|list %} | |
| {% set count = pollens|map(attribute='state')|map('int') | sum %} | |
| {% if count > 0 %} | |
| Pollen warning for today is... | |
| {%- for state in pollens if | |
| 'pollen_0d' in state.entity_id and float(state.state) > 0 %} | |
| {{state.name|replace("Norrkoping ", "") | |
| |replace(" pollen 0d", "")}}: {{ state.state }} p/m³{% endfor %} | |
| {% endif %} |
This file contains hidden or 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
| trigger: | |
| - platform: state | |
| to: | |
| - 'on' | |
| - 'off' | |
| entity_id: | |
| - binary_sensor.window_1 | |
| - binary_sensor.window_2 | |
| - binary_sensor.window_3_and_door_1 | |
| condition: [] |
This file contains hidden or 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
| template: | |
| - sensor: | |
| - name: "Outside Discomfort Index" | |
| unit_of_measurement: "" | |
| state_class: measurement | |
| state: >- | |
| {% set t = ((states('sensor.outside_temp')|float(0)) - 32) / 1.8 %} | |
| {% set h = states('sensor.outside_humidity')|float(0) %} | |
| {% set discomfort_index = (t - (0.55*(1 - (0.01*h) ) * (t - 14.5)))|round(2,0) %} | |
| {{ discomfort_index}} |