Home Assistant Git Exporter
parent
797e9578a3
commit
d952db1b07
|
@ -39,17 +39,18 @@ switch:
|
||||||
automation:
|
automation:
|
||||||
- id: 964db306d8b009f8f640
|
- id: 964db306d8b009f8f640
|
||||||
alias: Power NAS/Tumtum according to sleep
|
alias: Power NAS/Tumtum according to sleep
|
||||||
|
mode: restart # so we only do latest
|
||||||
trigger:
|
trigger:
|
||||||
- platform: template
|
- platform: template
|
||||||
value_template: |
|
value_template: |
|
||||||
{{ is_state('sensor.everyone_in_bed', 'on') and states('sensor.plex_tumtum_tree') | int(default=0) == 0 }}
|
{{ is_state('group.everyone_in_bed', 'on') and states('sensor.plex_tumtum_tree') | int(default=0) == 0 }}
|
||||||
for:
|
for:
|
||||||
minutes: 15
|
minutes: 15
|
||||||
variables:
|
variables:
|
||||||
service: switch.turn_off
|
service: switch.turn_off
|
||||||
- platform: template
|
- platform: template
|
||||||
value_template: |
|
value_template: |
|
||||||
{{ is_state('sensor.everyone_in_bed', 'off') }}
|
{{ is_state('group.everyone_in_bed', 'off') }}
|
||||||
for:
|
for:
|
||||||
minutes: 15
|
minutes: 15
|
||||||
variables:
|
variables:
|
||||||
|
|
|
@ -549,7 +549,7 @@ modbus:
|
||||||
device_class: power
|
device_class: power
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
scale: 1
|
scale: 1
|
||||||
scan_interval: 10
|
scan_interval: 1
|
||||||
|
|
||||||
- name: Inverter active power
|
- name: Inverter active power
|
||||||
unique_id: a3ee41f78c6c55377c00
|
unique_id: a3ee41f78c6c55377c00
|
||||||
|
@ -564,7 +564,7 @@ modbus:
|
||||||
device_class: power
|
device_class: power
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
scale: 1
|
scale: 1
|
||||||
scan_interval: 10
|
scan_interval: 1
|
||||||
|
|
||||||
- name: Inverter reactive power
|
- name: Inverter reactive power
|
||||||
unique_id: 5a58fe975877eec6d37c
|
unique_id: 5a58fe975877eec6d37c
|
||||||
|
@ -611,27 +611,28 @@ modbus:
|
||||||
# scale: 100
|
# scale: 100
|
||||||
# scan_interval: 10
|
# scan_interval: 10
|
||||||
|
|
||||||
# - name: System state
|
- name: Inverter system state (raw)
|
||||||
# slave: 1
|
slave: 1
|
||||||
# address: 12999
|
address: 12999
|
||||||
# input_type: input
|
input_type: input
|
||||||
# count: 1
|
count: 1
|
||||||
# data_type: uint16
|
data_type: uint16
|
||||||
# swap: word
|
swap: word
|
||||||
# precision: 0
|
precision: 0
|
||||||
# scale: 1
|
scale: 1
|
||||||
# scan_interval: 10
|
scan_interval: 1
|
||||||
|
|
||||||
# - name: Running state
|
# Currently this only ever returns 0x00 over Modbus :/
|
||||||
# slave: 1
|
- name: Inverter running state (raw)
|
||||||
# address: 13000
|
slave: 1
|
||||||
# input_type: input
|
address: 13000
|
||||||
# count: 1
|
input_type: input
|
||||||
# data_type: uint16
|
count: 1
|
||||||
# swap: word
|
data_type: uint16
|
||||||
# precision: 0
|
swap: word
|
||||||
# scale: 1
|
precision: 0
|
||||||
# scan_interval: 10
|
scale: 1
|
||||||
|
scan_interval: 1
|
||||||
|
|
||||||
- name: Inverter PV generation today
|
- name: Inverter PV generation today
|
||||||
unique_id: 27953d57c315260a7983
|
unique_id: 27953d57c315260a7983
|
||||||
|
@ -706,7 +707,7 @@ modbus:
|
||||||
device_class: power
|
device_class: power
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
scale: 1
|
scale: 1
|
||||||
scan_interval: 10
|
scan_interval: 1
|
||||||
|
|
||||||
- name: Inverter export power
|
- name: Inverter export power
|
||||||
unique_id: 4c3bac29a87561796c06
|
unique_id: 4c3bac29a87561796c06
|
||||||
|
@ -721,7 +722,7 @@ modbus:
|
||||||
device_class: power
|
device_class: power
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
scale: 1
|
scale: 1
|
||||||
scan_interval: 10
|
scan_interval: 1
|
||||||
|
|
||||||
- name: Inverter battery charge from PV today
|
- name: Inverter battery charge from PV today
|
||||||
unique_id: d496459e40e0d49f5c11
|
unique_id: d496459e40e0d49f5c11
|
||||||
|
@ -814,7 +815,7 @@ modbus:
|
||||||
device_class: current
|
device_class: current
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
scale: 0.1
|
scale: 0.1
|
||||||
scan_interval: 10
|
scan_interval: 1
|
||||||
|
|
||||||
- name: Inverter battery power (raw)
|
- name: Inverter battery power (raw)
|
||||||
unique_id: 4f7dacbf06d004b547d9
|
unique_id: 4f7dacbf06d004b547d9
|
||||||
|
@ -829,7 +830,7 @@ modbus:
|
||||||
device_class: power
|
device_class: power
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
scale: 1
|
scale: 1
|
||||||
scan_interval: 10
|
scan_interval: 1
|
||||||
|
|
||||||
- name: Inverter battery level
|
- name: Inverter battery level
|
||||||
unique_id: 61e9d0508f0e75a3f25c
|
unique_id: 61e9d0508f0e75a3f25c
|
||||||
|
@ -902,6 +903,7 @@ modbus:
|
||||||
scale: 0.1
|
scale: 0.1
|
||||||
scan_interval: 10
|
scan_interval: 10
|
||||||
|
|
||||||
|
# NOTE: this is broken over modbus and only ever returns 0x00
|
||||||
# - name: Grid state raw
|
# - name: Grid state raw
|
||||||
# slave: 1
|
# slave: 1
|
||||||
# address: 13029
|
# address: 13029
|
||||||
|
@ -1031,52 +1033,52 @@ modbus:
|
||||||
# precision: 0
|
# precision: 0
|
||||||
# scan_interval: 60
|
# scan_interval: 60
|
||||||
|
|
||||||
# - name: Battery Charge Discharge Power
|
- name: Inverter battery forced charge/discharge power
|
||||||
# slave: 1
|
slave: 1
|
||||||
# address: 13051 # 13052
|
address: 13051 # 13052
|
||||||
# input_type: holding
|
input_type: holding
|
||||||
# count: 1
|
count: 1
|
||||||
# data_type: uint16
|
data_type: uint16
|
||||||
# swap: word
|
swap: word
|
||||||
# precision: 0
|
precision: 0
|
||||||
# # datasheet says:
|
# datasheet says:
|
||||||
# # 0 to 5000 W for SH*K-*
|
# 0 to 5000 W for SH*K-*
|
||||||
# # 0 to 100 % for SH*.0RT
|
# 0 to 100 % for SH*.0RT
|
||||||
# # for my SH10RT it is set in W...
|
# for my SH10RT it is set in W...
|
||||||
# unit_of_measurement: W
|
unit_of_measurement: W
|
||||||
# device_class: power
|
device_class: power
|
||||||
# state_class: measurement
|
state_class: measurement
|
||||||
# scan_interval: 10
|
scan_interval: 10
|
||||||
|
|
||||||
# - name: Inverter max SoC
|
- name: Inverter max SoC
|
||||||
# unique_id: c602a1446bddc9d6fa7a
|
unique_id: c602a1446bddc9d6fa7a
|
||||||
# slave: 1
|
slave: 1
|
||||||
# address: 13057 # 13058
|
address: 13057 # 13058
|
||||||
# input_type: holding
|
input_type: holding
|
||||||
# count: 1
|
count: 1
|
||||||
# data_type: uint16
|
data_type: uint16
|
||||||
# swap: word
|
swap: word
|
||||||
# precision: 1
|
precision: 1
|
||||||
# unit_of_measurement: "%"
|
unit_of_measurement: "%"
|
||||||
# device_class: battery
|
device_class: battery
|
||||||
# state_class: measurement
|
state_class: measurement
|
||||||
# scale: 0.1
|
scale: 0.1
|
||||||
# scan_interval: 60
|
scan_interval: 60
|
||||||
|
|
||||||
# - name: Inverter min SoC
|
- name: Inverter min SoC
|
||||||
# unique_id: 61a08ee663d37248f372
|
unique_id: 61a08ee663d37248f372
|
||||||
# slave: 1
|
slave: 1
|
||||||
# address: 13058 # 13059
|
address: 13058 # 13059
|
||||||
# input_type: holding
|
input_type: holding
|
||||||
# count: 1
|
count: 1
|
||||||
# data_type: uint16
|
data_type: uint16
|
||||||
# swap: word
|
swap: word
|
||||||
# precision: 1
|
precision: 1
|
||||||
# unit_of_measurement: "%"
|
unit_of_measurement: "%"
|
||||||
# device_class: battery
|
device_class: battery
|
||||||
# state_class: measurement
|
state_class: measurement
|
||||||
# scale: 0.1
|
scale: 0.1
|
||||||
# scan_interval: 60
|
scan_interval: 60
|
||||||
|
|
||||||
# binary_sensor:
|
# binary_sensor:
|
||||||
# - platform: template
|
# - platform: template
|
||||||
|
@ -1109,6 +1111,8 @@ sensor:
|
||||||
{% set power = states('sensor.inverter_battery_power_raw') %}
|
{% set power = states('sensor.inverter_battery_power_raw') %}
|
||||||
{% if 'unavailable' in [current, power] %}
|
{% if 'unavailable' in [current, power] %}
|
||||||
unavailable
|
unavailable
|
||||||
|
{% elif 'unknown' in [current, power] %}
|
||||||
|
unknown
|
||||||
{% elif current|float < 0.0 and power|float > 0.0 %}
|
{% elif current|float < 0.0 and power|float > 0.0 %}
|
||||||
{{ -1 * power | float }}
|
{{ -1 * power | float }}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -1116,35 +1120,37 @@ sensor:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
unit_of_measurement: W
|
unit_of_measurement: W
|
||||||
device_class: power
|
device_class: power
|
||||||
# sungrow_inverter_state:
|
inverter_state:
|
||||||
# # Inverter States from modbus reference manual
|
# Inverter States from modbus reference manual
|
||||||
# friendly_name: "Sungrow Inverter State"
|
friendly_name: "Inverter state"
|
||||||
# value_template: >-
|
value_template: >-
|
||||||
# {% if ((states('sensor.system_state') | int(default=0)) == 0x0002) %}
|
{% if ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x0002) %}
|
||||||
# Stop
|
Stop
|
||||||
# {% elif ((states('sensor.system_state') | int(default=0)) == 0x0008) %}
|
{% elif ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x0008) %}
|
||||||
# Standby
|
Standby
|
||||||
# {% elif ((states('sensor.system_state') | int(default=0)) == 0x0010) %}
|
{% elif ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x0010) %}
|
||||||
# Initial Standby
|
Initial Standby
|
||||||
# {% elif ((states('sensor.system_state') | int(default=0)) == 0x0020) %}
|
{% elif ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x0020) %}
|
||||||
# Startup
|
Startup
|
||||||
# {% elif ((states('sensor.system_state') | int(default=0)) == 0x0040) %}
|
{% elif ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x0040) %}
|
||||||
# Running
|
Running
|
||||||
# {% elif ((states('sensor.system_state') | int(default=0)) == 0x0100) %}
|
{% elif ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x0100) %}
|
||||||
# Fault
|
Fault
|
||||||
# {% elif ((states('sensor.system_state') | int(default=0)) == 0x0400) %}
|
{% elif ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x0400) %}
|
||||||
# Maintain mode
|
Maintain mode
|
||||||
# {% elif ((states('sensor.system_state') | int(default=0)) == 0x0800) %}
|
{% elif ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x0800) %}
|
||||||
# Forced mode
|
Forced mode
|
||||||
# {% elif ((states('sensor.system_state') | int(default=0)) == 0x1000) %}
|
{% elif ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x8200) %}
|
||||||
# Off-grid mode
|
Dispatch running {# what even is this? #}
|
||||||
# {% elif ((states('sensor.system_state') | int(default=0)) == 0x2501) %}
|
{% elif ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x1000) %}
|
||||||
# Restarting
|
Off-grid mode
|
||||||
# {% elif ((states('sensor.system_state') | int(default=0)) == 0x4000) %}
|
{% elif ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x2501) %}
|
||||||
# External EMS mode
|
Restarting
|
||||||
# {% else %}
|
{% elif ((states('sensor.inverter_system_state_raw') | int(default=0)) == 0x4000) %}
|
||||||
# Unknown - should not see me!
|
External EMS mode
|
||||||
# {% endif %}
|
{% else %}
|
||||||
|
unknown {#- should not see this #}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# sungrow_grid_state:
|
# sungrow_grid_state:
|
||||||
# friendly_name: "Sungrow Grid State"
|
# friendly_name: "Sungrow Grid State"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"battery": 41,
|
"battery": 41,
|
||||||
"temperature": 19,
|
"temperature": 19,
|
||||||
"linkquality": 255,
|
"linkquality": 255,
|
||||||
"device_temperature": 21,
|
"device_temperature": 23,
|
||||||
"power_outage_count": 8
|
"power_outage_count": 8
|
||||||
},
|
},
|
||||||
"0x00158d00080915bd": {
|
"0x00158d00080915bd": {
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
"power_outage_count": 41
|
"power_outage_count": 41
|
||||||
},
|
},
|
||||||
"0x5c0272fffee93bae": {
|
"0x5c0272fffee93bae": {
|
||||||
"occupancy": true,
|
"occupancy": false,
|
||||||
"tamper": false,
|
"tamper": false,
|
||||||
"battery_low": false,
|
"battery_low": false,
|
||||||
"linkquality": 255
|
"linkquality": 255
|
||||||
|
@ -68,10 +68,10 @@
|
||||||
},
|
},
|
||||||
"0xa4c138fda4db2c5e": {
|
"0xa4c138fda4db2c5e": {
|
||||||
"occupancy": true,
|
"occupancy": true,
|
||||||
"battery": 50,
|
"battery": 100,
|
||||||
"sensitivity": "high",
|
"sensitivity": "high",
|
||||||
"keep_time": "120",
|
"keep_time": "120",
|
||||||
"illuminance": 874,
|
"illuminance": 898,
|
||||||
"linkquality": 127
|
"linkquality": 127
|
||||||
},
|
},
|
||||||
"0x84b4dbfffe850fda": {
|
"0x84b4dbfffe850fda": {
|
||||||
|
|
|
@ -95,6 +95,10 @@ config:
|
||||||
type: entities
|
type: entities
|
||||||
title: Battery
|
title: Battery
|
||||||
type: custom:stack-in-card
|
type: custom:stack-in-card
|
||||||
|
- entities:
|
||||||
|
- entity: sensor.inverter_state
|
||||||
|
- entity: sensor.inverter_system_state_raw
|
||||||
|
type: entities
|
||||||
icon: mdi:solar-power-variant
|
icon: mdi:solar-power-variant
|
||||||
theme: Backend-selected
|
theme: Backend-selected
|
||||||
title: Solar
|
title: Solar
|
||||||
|
|
Loading…
Reference in New Issue