diff --git a/config/automation/Timed_Triggers/sunset_turn_on.yaml b/config/automation/Timed_Triggers/sunset_turn_on.yaml
index bca5bf16..73b784e1 100755
--- a/config/automation/Timed_Triggers/sunset_turn_on.yaml
+++ b/config/automation/Timed_Triggers/sunset_turn_on.yaml
@@ -9,6 +9,11 @@
- platform: sun
event: sunset
offset: "-00:20:00"
+
+ condition:
+ - condition: template
+ value_template: "{{ states('sensor.grid_status') == 'True' }}"
+
action:
- delay: '00:{{ (range(1, 20)|random|int) }}:00'
- service: script.tweet_engine_image
diff --git a/config/packages/powerwall.yaml b/config/packages/powerwall.yaml
index d3f88ae2..178f150a 100755
--- a/config/packages/powerwall.yaml
+++ b/config/packages/powerwall.yaml
@@ -2,6 +2,7 @@
### @Tesla Powerwall - https://www.vcloudinfo.com/2018/01/going-green-to-save-some-green-in-2018.html
# # @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
+# Read more about this on https://www.vcloudinfo.com
######################################################################################################
sensor:
@@ -64,11 +65,9 @@ sensor:
#
automation:
- alias: Notify if Grid is down
-
trigger:
- platform: state
entity_id: sensor.grid_status
-
condition:
condition: or
conditions:
@@ -76,7 +75,6 @@ automation:
value_template: "{{ states('sensor.grid_status') == 'True' }}"
- condition: template
value_template: "{{ states('sensor.grid_status') == 'False' }}"
-
action:
- service: script.notify_engine
data_template:
@@ -87,27 +85,83 @@ automation:
# https://github.com/CCOSTAN/Home-AssistantConfig/issues/779
- alias: Shut Things down if running on PowerWall
-
trigger:
- platform: state
entity_id: sensor.grid_status
from: 'True'
to: 'False'
- for: "00:01:00"
-
+ for:
+ minutes: 1
condition:
- condition: template
value_template: "{{ states('sensor.grid_status') == 'False' }}"
-
action:
- service: homeassistant.turn_off
entity_id:
- group.interior_lights
- group.exterior_lights
-
- 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 House Lights to preserve Battery Power."
who: 'family'
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'
diff --git a/config/www/community/search-card/search-card.js b/config/www/community/search-card/search-card.js
index 4a3b7dc9..3cf93a0c 100644
--- a/config/www/community/search-card/search-card.js
+++ b/config/www/community/search-card/search-card.js
@@ -54,8 +54,8 @@ class SearchCard extends ct.LitElement {
@value-changed="${this._valueChanged}"
no-label-float
label="Type to search...">
-
+