Home Assistant Git Exporter
parent
6617df672a
commit
c77de82af4
|
@ -42,10 +42,7 @@ automation:
|
|||
trigger:
|
||||
- platform: template
|
||||
value_template: |
|
||||
{{
|
||||
is_state('sensor.everyone_in_bed', 'on') and
|
||||
is_state('sensor.plex_tumtum_tree', '0')
|
||||
}}
|
||||
{{ is_state('sensor.everyone_in_bed', 'on') and states('sensor.plex_tumtum_tree') | int(default=0) == 0 }}
|
||||
for:
|
||||
minutes: 15
|
||||
variables:
|
||||
|
|
|
@ -119,6 +119,10 @@ automation:
|
|||
entity_id: sensor.inverter_battery_level
|
||||
below: input_number.inverter_charging_schedule_2_target_soc
|
||||
variables:
|
||||
# Enable each schedule only if battery level is below target, it is explicitly enabled, and the dates have values.
|
||||
# NOTE: It would be better to take into consideration if the schedule is active (timewise) but in effect disabling
|
||||
# it unconditionally when battery level is higher doesn't matter, since we also trigger when it is lower and
|
||||
# it will become re-enabled again.
|
||||
enabled_1: |
|
||||
{{ is_state('input_boolean.inverter_charging_schedule_enabled', 'on') and
|
||||
states('input_number.inverter_charging_schedule_target_soc') | float(default = 0) > states('sensor.inverter_battery_level') | float(default = 0) and
|
||||
|
@ -128,8 +132,8 @@ automation:
|
|||
enabled_2: |
|
||||
{{ is_state('input_boolean.inverter_charging_schedule_2_enabled', 'on') and
|
||||
states('input_number.inverter_charging_schedule_2_target_soc') | float(default = 0) > states('sensor.inverter_battery_level') | float(default = 0) and
|
||||
not is_state('input_datetime.inverter_charging_schedule_start', 'unknown') and
|
||||
not is_state('input_datetime.inverter_charging_schedule_end', 'unknown')
|
||||
not is_state('input_datetime.inverter_charging_schedule_2_start', 'unknown') and
|
||||
not is_state('input_datetime.inverter_charging_schedule_2_end', 'unknown')
|
||||
}}
|
||||
action:
|
||||
- service: script.apply_charging_schedule
|
||||
|
@ -148,8 +152,8 @@ automation:
|
|||
{% else %}
|
||||
0
|
||||
{% endif %}
|
||||
start_time_2: "{{ states('input_datetime.inverter_charging_2_schedule_start') | replace('unknown','00:00') }}"
|
||||
end_time_2: "{{ states('input_datetime.inverter_charging_2_schedule_end') | replace('unknown','00:00') }}"
|
||||
start_time_2: "{{ states('input_datetime.inverter_charging_schedule_2_start') | replace('unknown','00:00') }}"
|
||||
end_time_2: "{{ states('input_datetime.inverter_charging_schedule_2_end') | replace('unknown','00:00') }}"
|
||||
|
||||
- id: 7b93d325bfe632a4e890
|
||||
alias: Inverter - update battery reserve
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"linkquality": 215
|
||||
},
|
||||
"0x00158d0008091c32": {
|
||||
"contact": true,
|
||||
"contact": false,
|
||||
"voltage": 2995,
|
||||
"battery": 41,
|
||||
"temperature": 19,
|
||||
|
@ -22,7 +22,7 @@
|
|||
"battery": 44,
|
||||
"temperature": 17,
|
||||
"linkquality": 255,
|
||||
"device_temperature": 20,
|
||||
"device_temperature": 19,
|
||||
"power_outage_count": 7
|
||||
},
|
||||
"0x00158d0007e7725b": {
|
||||
|
@ -45,15 +45,15 @@
|
|||
},
|
||||
"0x00158d0007e4c4f2": {
|
||||
"contact": true,
|
||||
"voltage": 2975,
|
||||
"battery": 36,
|
||||
"voltage": 2985,
|
||||
"battery": 39,
|
||||
"temperature": 21,
|
||||
"linkquality": 255,
|
||||
"device_temperature": 24,
|
||||
"device_temperature": 23,
|
||||
"power_outage_count": 41
|
||||
},
|
||||
"0x5c0272fffee93bae": {
|
||||
"occupancy": true,
|
||||
"occupancy": false,
|
||||
"tamper": false,
|
||||
"battery_low": false,
|
||||
"linkquality": 255
|
||||
|
@ -67,11 +67,11 @@
|
|||
"linkquality": 191
|
||||
},
|
||||
"0xa4c138fda4db2c5e": {
|
||||
"occupancy": true,
|
||||
"occupancy": false,
|
||||
"battery": 100,
|
||||
"sensitivity": "high",
|
||||
"keep_time": "120",
|
||||
"illuminance": 850,
|
||||
"illuminance": 586,
|
||||
"linkquality": 127
|
||||
},
|
||||
"0x84b4dbfffe850fda": {
|
||||
|
|
|
@ -217,18 +217,6 @@ config:
|
|||
secondary_info: last-changed
|
||||
- entity: sensor.electricity_general_forecast
|
||||
type: entities
|
||||
- content: "{% set wattage = states.sensor\n | rejectattr('state', 'in', ['unknown',\
|
||||
\ 'unavailable'])\n | selectattr('attributes.device_class', 'defined')\n\
|
||||
\ | selectattr('attributes.device_class', 'eq', 'power')\n | selectattr('attributes.unit_of_measurement',\
|
||||
\ 'defined')\n | selectattr('attributes.unit_of_measurement', 'eq', \"W\"\
|
||||
)\n | rejectattr('name', 'search', 'Estimate')\n | rejectattr('name',\
|
||||
\ 'search', 'Inverter')\n | list\n %}\n\n{% set total = wattage|map(attribute='state')|map('float')|list|sum\
|
||||
\ / 1000.0|round(3) %}\n{% set meter = (states('sensor.inverter_load_power')|float/1000.0\
|
||||
\ + states('sensor.eagle_200_meter_power_demand')|float) |round(3) %}\n**TOTAL:**\
|
||||
\ {{ total }} kW\n**METER:** {{ meter }} kW\n**Unaccounted:** {{ (meter -\
|
||||
\ total) | round(2) }} kW\n\n{% for s in wattage|sort(attribute='state') %}\n\
|
||||
- {{ s.name}}: {{s.state}} W\n{% endfor %}"
|
||||
type: markdown
|
||||
- cards:
|
||||
- entity: sensor.eagle_200_meter_power_demand
|
||||
max: 5
|
||||
|
@ -336,6 +324,19 @@ config:
|
|||
type: section
|
||||
- entity: input_boolean.inverter_charging_schedule_enabled
|
||||
name: Enable
|
||||
- conditions:
|
||||
- entity: input_boolean.inverter_charging_schedule_2_enabled
|
||||
state: 'on'
|
||||
row:
|
||||
name: Active
|
||||
state: "{{ is_state('input_boolean.inverter_charging_schedule_enabled',\
|
||||
\ 'on') and\n states('input_number.inverter_charging_schedule_target_soc')\
|
||||
\ | float(default = 0) > states('sensor.inverter_battery_level') | float(default\
|
||||
\ = 0) and\n not is_state('input_datetime.inverter_charging_schedule_start',\
|
||||
\ 'unknown') and\n not is_state('input_datetime.inverter_charging_schedule_end',\
|
||||
\ 'unknown')\n}}\n"
|
||||
type: custom:template-entity-row
|
||||
type: conditional
|
||||
- conditions:
|
||||
- entity: input_boolean.inverter_charging_schedule_enabled
|
||||
state: 'on'
|
||||
|
@ -364,6 +365,19 @@ config:
|
|||
type: section
|
||||
- entity: input_boolean.inverter_charging_schedule_2_enabled
|
||||
name: Enable
|
||||
- conditions:
|
||||
- entity: input_boolean.inverter_charging_schedule_2_enabled
|
||||
state: 'on'
|
||||
row:
|
||||
name: Active
|
||||
state: "{{ is_state('input_boolean.inverter_charging_schedule_2_enabled',\
|
||||
\ 'on') and\n states('input_number.inverter_charging_schedule_2_target_soc')\
|
||||
\ | float(default = 0) > states('sensor.inverter_battery_level') | float(default\
|
||||
\ = 0) and\n not is_state('input_datetime.inverter_charging_schedule_2_start',\
|
||||
\ 'unknown') and\n not is_state('input_datetime.inverter_charging_schedule_2_end',\
|
||||
\ 'unknown')\n}}\n"
|
||||
type: custom:template-entity-row
|
||||
type: conditional
|
||||
- conditions:
|
||||
- entity: input_boolean.inverter_charging_schedule_2_enabled
|
||||
state: 'on'
|
||||
|
|
Loading…
Reference in New Issue