Added in Powerwall via UI integration - updated #272

This commit is contained in:
ccostan 2020-09-20 15:20:32 -04:00
parent ec749c92a4
commit 56de53302d
4 changed files with 13 additions and 74 deletions

View File

@ -14,7 +14,7 @@
condition: condition:
- condition: template - condition: template
value_template: "{{ states('sensor.grid_status') == 'True' }}" value_template: "{{ states('binary_sensor.grid_status') == 'on' }}"
action: action:
- delay: '00:{{ (range(1, 20)|random|int) }}:00' - delay: '00:{{ (range(1, 20)|random|int) }}:00'

View File

@ -77,7 +77,6 @@ http:
# login_attempts_threshold: 5 # login_attempts_threshold: 5
frontend: frontend:
javascript_version: latest
panel_custom: panel_custom:
- name: floorplan - name: floorplan
@ -88,14 +87,6 @@ panel_custom:
hide_app_toolbar: hide_app_toolbar:
config: /local/custom_ui/floorplan/floorplan.yaml config: /local/custom_ui/floorplan/floorplan.yaml
- name: clock
sidebar_title: Alarm Clock
sidebar_icon: mdi:alarm
url_path: clock
config:
hide_app_toolbar:
config: /local/custom_ui/floorplan/floorclock.yaml
discovery: discovery:
updater: updater:
@ -187,7 +178,7 @@ tts:
voice: Joanna voice: Joanna
cache: True cache: True
wink: # wink:
homekit: !include homekit.yaml homekit: !include homekit.yaml
group: !include_dir_merge_named group group: !include_dir_merge_named group
device_tracker: !include_dir_merge_list device_tracker device_tracker: !include_dir_merge_list device_tracker

View File

@ -3,62 +3,10 @@
# # @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 # Read more about this on https://www.vcloudinfo.com
# Tesla Powerwall added via UI Integration
# Tesla Powerwall Monitoring #272
###################################################################################################### ######################################################################################################
sensor:
- platform: rest
resource: https://192.168.10.90/api/system_status/grid_status
verify_ssl: false
method: GET
name: Grid Status
scan_interval: 60
value_template: "{{ value_json.grid_status == 'SystemGridConnected' }}"
- platform: rest
name: House now
resource: https://192.168.10.90/api/meters/aggregates
method: GET
verify_ssl: false
value_template: '{{ value_json.load.instant_power / 1000 | round(2) }}'
unit_of_measurement: kWh
device_class: power
- platform: rest
name: Grid now
resource: https://192.168.10.90/api/meters/aggregates
method: GET
verify_ssl: false
value_template: '{{ value_json.site.instant_power / 1000 | round(2) }}'
unit_of_measurement: kWh
device_class: power
- platform: rest
name: Solar now
resource: https://192.168.10.90/api/meters/aggregates
method: GET
verify_ssl: false
value_template: '{{ value_json.solar.instant_power / 1000 | round(2) }}'
unit_of_measurement: kWh
device_class: power
- platform: rest
name: PowerWall Battery now
resource: https://192.168.10.90/api/meters/aggregates
method: GET
verify_ssl: false
value_template: '{{ value_json.battery.instant_power / 1000 | round(2) }}'
unit_of_measurement: kWh
device_class: power
- platform: rest
name: PowerWall Battery Capacity
resource: https://192.168.10.90/api/system_status/soe
method: GET
verify_ssl: false
value_template: '{{ (value_json.percentage | float | round(0)) }}'
unit_of_measurement: '%'
scan_interval: 300
device_class: battery
#------------------------------------------- #-------------------------------------------
# Located in the Grafana package. Tweets out Solar Production Daily! # Located in the Grafana package. Tweets out Solar Production Daily!
@ -68,18 +16,18 @@ automation:
id: 56a32121-5725-4510-a1fa-10f69a5c82ef id: 56a32121-5725-4510-a1fa-10f69a5c82ef
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.grid_status entity_id: binary_sensor.grid_status
condition: condition:
condition: or condition: or
conditions: conditions:
- condition: template - condition: template
value_template: "{{ states('sensor.grid_status') == 'True' }}" value_template: "{{ states('binary_sensor.grid_status') == 'on' }}"
- condition: template - condition: template
value_template: "{{ states('sensor.grid_status') == 'False' }}" value_template: "{{ states('binary_sensor.grid_status') == 'off' }}"
action: action:
- 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('on', 'up')|replace('off', 'down') }}."
value1: "Please verify with the Tesla App." value1: "Please verify with the Tesla App."
who: 'parents' who: 'parents'
apns_id: 'information' apns_id: 'information'
@ -90,7 +38,7 @@ automation:
id: 37288a96-5f49-46c2-85c8-7e8794d23612 id: 37288a96-5f49-46c2-85c8-7e8794d23612
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.grid_status entity_id: binary_sensor.grid_status
from: 'True' from: 'True'
to: 'False' to: 'False'
@ -134,7 +82,7 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.grid_status entity_id: binary_sensor.grid_status
from: 'True' from: 'True'
to: 'False' to: 'False'
for: for:
@ -142,7 +90,7 @@ automation:
condition: condition:
- condition: template - condition: template
value_template: "{{ states('sensor.grid_status') == 'False' }}" value_template: "{{ states('binary_sensor.grid_status') == 'off' }}"
action: action:
- service: climate.turn_off - service: climate.turn_off
@ -163,7 +111,7 @@ automation:
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.grid_status entity_id: binary_sensor.grid_status
from: 'False' from: 'False'
to: 'True' to: 'True'
for: for:
@ -171,7 +119,7 @@ automation:
condition: condition:
- condition: template - condition: template
value_template: "{{ states('sensor.grid_status') == 'True' }}" value_template: "{{ states('binary_sensor.grid_status') == 'on' }}"
- condition: or - condition: or
conditions: conditions:
- condition: state - condition: state

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 38 KiB