Last active
November 6, 2020 07:13
-
-
Save bogdanbujdea/95a788d9dd4a1bce4d44e9ca3ca51b1c to your computer and use it in GitHub Desktop.
Active power consumers in Home Assistant
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
| type: conditional | |
| conditions: | |
| - entity: sensor.apartment_power_total | |
| state_not: "off" | |
| card: | |
| type: vertical-stack | |
| cards: | |
| - type: custom:auto-entities | |
| card: | |
| type: entities | |
| title: Active consumers | |
| show_header_toggle: false | |
| entities: | |
| filter: | |
| template: | | |
| sensor.apartment_power_adjusted | |
| sensor.smart_plugs_consumption_summed | |
| {% for light in states.light %} | |
| {% if light.state == "on" %} | |
| {{ light.entity_id}} | |
| {% endif %} | |
| {% endfor %} | |
| {% for media_player in states.media_player %} | |
| {% if media_player.state != "standby" and media_player.state != 'off' and media_player.state !='unavailable' %} | |
| {{ media_player.entity_id}}, | |
| {% endif %} | |
| {% endfor %} | |
| {% for climate in states.climate %} | |
| {% if climate.state != 'off' and climate.state !='unavailable' %} | |
| {{ climate.entity_id}}, | |
| {% endif %} | |
| {% endfor %} | |
| - type: entity-filter | |
| entities: | |
| - sensor.dryer | |
| - switch.washer | |
| state_filter: | |
| - "on" | |
| show_empty: false | |
| card: | |
| type: markdown | |
| title: Read-only | |
| theme: 'transparent' | |
| content: | | |
| {% if is_state("sensor.dryer_2", "on") %} | |
| Drier is on | |
| - Current state: {{states.sensor.dryer.attributes.current_course}} | |
| - Remaining time: {{states.sensor.dryer.attributes.remain_time}} minutes | |
| {% endif %} | |
| {% if is_state("switch.washer", "on") %} | |
| Washer | |
| - Status: {{ states.sensor.washer_job_state.state }} | |
| - Power usage: {{ state_attr('switch.power_2', 'current_power_w') }} W | |
| - Finishing at: {{ strptime(states('sensor.washer_completion_time'), '%Y-%m-%dT%H:%M:%S.%fZ').hour + 3 }}:{{ strptime(states('sensor.washer_completion_time'), '%Y-%m-%dT%H:%M:%S.%fZ').minute }} | |
| {% endif %} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment