parent
f50f3a126d
commit
da330c6be4
|
@ -9,6 +9,11 @@
|
||||||
- platform: sun
|
- platform: sun
|
||||||
event: sunset
|
event: sunset
|
||||||
offset: "-00:20:00"
|
offset: "-00:20:00"
|
||||||
|
|
||||||
|
condition:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('sensor.grid_status') == 'True' }}"
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- delay: '00:{{ (range(1, 20)|random|int) }}:00'
|
- delay: '00:{{ (range(1, 20)|random|int) }}:00'
|
||||||
- service: script.tweet_engine_image
|
- service: script.tweet_engine_image
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
### @Tesla Powerwall - https://www.vcloudinfo.com/2018/01/going-green-to-save-some-green-in-2018.html
|
### @Tesla Powerwall - https://www.vcloudinfo.com/2018/01/going-green-to-save-some-green-in-2018.html
|
||||||
# # @CCOSTAN
|
# # @CCOSTAN
|
||||||
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||||
|
# Read more about this on https://www.vcloudinfo.com
|
||||||
######################################################################################################
|
######################################################################################################
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
|
@ -64,11 +65,9 @@ sensor:
|
||||||
#
|
#
|
||||||
automation:
|
automation:
|
||||||
- alias: Notify if Grid is down
|
- alias: Notify if Grid is down
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: sensor.grid_status
|
entity_id: sensor.grid_status
|
||||||
|
|
||||||
condition:
|
condition:
|
||||||
condition: or
|
condition: or
|
||||||
conditions:
|
conditions:
|
||||||
|
@ -76,7 +75,6 @@ automation:
|
||||||
value_template: "{{ states('sensor.grid_status') == 'True' }}"
|
value_template: "{{ states('sensor.grid_status') == 'True' }}"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('sensor.grid_status') == 'False' }}"
|
value_template: "{{ states('sensor.grid_status') == 'False' }}"
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: script.notify_engine
|
- service: script.notify_engine
|
||||||
data_template:
|
data_template:
|
||||||
|
@ -87,27 +85,83 @@ automation:
|
||||||
|
|
||||||
# https://github.com/CCOSTAN/Home-AssistantConfig/issues/779
|
# https://github.com/CCOSTAN/Home-AssistantConfig/issues/779
|
||||||
- alias: Shut Things down if running on PowerWall
|
- alias: Shut Things down if running on PowerWall
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: sensor.grid_status
|
entity_id: sensor.grid_status
|
||||||
from: 'True'
|
from: 'True'
|
||||||
to: 'False'
|
to: 'False'
|
||||||
for: "00:01:00"
|
for:
|
||||||
|
minutes: 1
|
||||||
condition:
|
condition:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('sensor.grid_status') == 'False' }}"
|
value_template: "{{ states('sensor.grid_status') == 'False' }}"
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: homeassistant.turn_off
|
- service: homeassistant.turn_off
|
||||||
entity_id:
|
entity_id:
|
||||||
- group.interior_lights
|
- group.interior_lights
|
||||||
- group.exterior_lights
|
- group.exterior_lights
|
||||||
|
|
||||||
- service: script.notify_engine
|
- service: script.notify_engine
|
||||||
data_template:
|
data_template:
|
||||||
title: "Electrical Grid Status {{ (trigger.to_state.state)|replace('True', 'up')|replace('False', 'down') }}."
|
title: "Electrical Grid Status {{ (trigger.to_state.state)|replace('True', 'up')|replace('False', 'down') }}."
|
||||||
value1: "Taking actions to turning off the House Lights to preserve Battery Power."
|
value1: "Taking actions to turning off the House Lights to preserve Battery Power."
|
||||||
who: 'family'
|
who: 'family'
|
||||||
apns_id: 'information'
|
apns_id: 'information'
|
||||||
|
|
||||||
|
# https://github.com/CCOSTAN/Home-AssistantConfig/issues/547
|
||||||
|
- alias: Turn off the Nest Thermostats during a Power Outage
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: sensor.grid_status
|
||||||
|
from: 'True'
|
||||||
|
to: 'False'
|
||||||
|
for:
|
||||||
|
minutes: 5
|
||||||
|
|
||||||
|
condition:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('sensor.grid_status') == 'False' }}"
|
||||||
|
|
||||||
|
action:
|
||||||
|
- service: climate.turn_off
|
||||||
|
data:
|
||||||
|
entity_id:
|
||||||
|
- climate.downstairs
|
||||||
|
- climate.upstairs
|
||||||
|
|
||||||
|
- service: script.notify_engine
|
||||||
|
data_template:
|
||||||
|
title: "Electrical Grid Status {{ (trigger.to_state.state)|replace('True', 'up')|replace('False', 'down') }}."
|
||||||
|
value1: "Taking actions to turning off the AC units to preserve Battery Power."
|
||||||
|
who: 'family'
|
||||||
|
apns_id: 'information'
|
||||||
|
|
||||||
|
- alias: Turn back on the Nest Thermostats after a Power Outage
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: sensor.grid_status
|
||||||
|
from: 'False'
|
||||||
|
to: 'True'
|
||||||
|
for:
|
||||||
|
minutes: 5
|
||||||
|
|
||||||
|
condition:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('sensor.grid_status') == 'True' }}"
|
||||||
|
- condition: or
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: climate.downstairs
|
||||||
|
state: 'off'
|
||||||
|
- condition: state
|
||||||
|
entity_id: climate.upstairs
|
||||||
|
state: 'off'
|
||||||
|
|
||||||
|
action:
|
||||||
|
- service: climate.set_hvac_mode
|
||||||
|
data:
|
||||||
|
entity_id:
|
||||||
|
- climate.downstairs
|
||||||
|
- climate.upstairs
|
||||||
|
hvac_mode: 'auto'
|
||||||
|
|
|
@ -54,8 +54,8 @@ class SearchCard extends ct.LitElement {
|
||||||
@value-changed="${this._valueChanged}"
|
@value-changed="${this._valueChanged}"
|
||||||
no-label-float
|
no-label-float
|
||||||
label="Type to search...">
|
label="Type to search...">
|
||||||
<iron-icon icon="mdi:magnify"
|
<ha-icon icon="mdi:magnify" id="searchIcon"
|
||||||
slot="prefix"></iron-icon>
|
slot="prefix"></ha-icon>
|
||||||
<paper-icon-button slot="suffix"
|
<paper-icon-button slot="suffix"
|
||||||
@click="${this._clearInput}"
|
@click="${this._clearInput}"
|
||||||
icon="mdi:close"
|
icon="mdi:close"
|
||||||
|
@ -177,6 +177,9 @@ class SearchCard extends ct.LitElement {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
#searchIcon {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue