config.yaml
Kód: Vybrat vše
sensor: !include_dir_merge_list sensors/
Kód: Vybrat vše
sensor:
- platform: history_stats
name: "bbathroom time"
entity_id: sensor.hvac_activity_bbathroom
state: heating
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
- platform: history_stats
name: "Livingroom time"
entity_id: sensor.hvac_activity_livingroom
state: heating
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
- platform: history_stats
name: "Adams room time"
entity_id: sensor.hvac_activity_adams
state: heating
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
- platform: history_stats
name: "bedroom time"
entity_id: sensor.hvac_activity_bedroom
state: heating
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
- platform: history_stats
name: "cloakroom time"
entity_id: sensor.hvac_activity_cloakroom
state: heating
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
- platform: history_stats
name: "entrance hall time"
entity_id: sensor.hvac_activity_entrance_hall
state: heating
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
- platform: history_stats
name: "hall time"
entity_id: sensor.hvac_activity_hall
state: heating
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
- platform: history_stats
name: "office time"
entity_id: sensor.hvac_activity_office
state: heating
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
- platform: history_stats
name: "sbathroom time"
entity_id: sensor.hvac_activity_sbathroom
state: heating
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
- platform: history_stats
name: "troom time"
entity_id: sensor.hvac_activity_troom
state: heating
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
- platform: history_stats
name: "toilet time"
entity_id: sensor.hvac_activity_toilet
state: heating
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
template:
- sensor:
- name: "Bbathroom consumption"
unique_id: bbathroom_consumption_heating
state: "{{ ((states('sensor.bbathroom_time') | float * 0.75) | round(2) )}}"
availability: "{{ states('sensor.bbathroom_time') | is_number }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "Livingroom consumption"
unique_id: livingroom_consumption_heating
state: "{{ ((states('sensor.livingroom_time') | float * 4) | round(2) )}}"
availability: "{{ states('sensor.livingroom_time') | is_number }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "Adams room consumption"
unique_id: adamsroom_consumption_heating
state: "{{ ((states('sensor.adams_room_time') | float * 0.95) | round(2) )}}"
availability: "{{ states('sensor.adams_room_time') | is_number }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "Bedroom consumption"
unique_id: bedroom_consumption_heating
state: "{{ ((states('sensor.bedroom_time') | float * 0.95) | round(2) )}}"
availability: "{{ states('sensor.bedroom_time') | is_number }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "Cloakroom consumption"
unique_id: cloakroom_consumption_heating
state: "{{ ((states('sensor.cloakroom_time') | float * 0.25) | round(2) )}}"
availability: "{{ states('sensor.cloakroom_time') | is_number }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "Entrance hall consumption"
unique_id: entrance_hall_consumption_heating
state: "{{ ((states('sensor.entrance_hall_time') | float * 0.6) | round(2) )}}"
availability: "{{ states('sensor.entrance_hall_time') | is_number }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "Hall consumption"
unique_id: hall_consumption_heating
state: "{{ ((states('sensor.hall_time') | float * 0.12) | round(2) )}}"
availability: "{{ states('sensor.hall_time') | is_number }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "Office consumption"
unique_id: office_consumption_heating
state: "{{ ((states('sensor.office_time') | float * 0.95) | round(2) )}}"
availability: "{{ states('sensor.office_time') | is_number }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "Sbathroom consumption"
unique_id: sbathroom_consumption_heating
state: "{{ ((states('sensor.sbathroom_time') | float * 0.4) | round(2) )}}"
availability: "{{ states('sensor.sbathroom_time') | is_number }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "Troom consumption"
unique_id: troom_consumption_heating
state: "{{ ((states('sensor.troom_time') | float * 0.4) | round(2) )}}"
availability: "{{ states('sensor.troom_time') | is_number }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "Toilet consumption"
unique_id: toilet_consumption_heating
state: "{{ ((states('sensor.toilet_time') | float * 0.2) | round(2) )}}"
availability: "{{ states('sensor.toilet_time') | is_number }}"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "Heating total kWh"
unique_id: total_consumption_heating
state: >
{{ (states('sensor.bbathroom_consumption') | float(0) +
states('sensor.livingroom_consumption') | float(0) +
states('sensor.bedroom_consumption') | float(0) +
states('sensor.cloakroom_consumption') | float(0) +
states('sensor.entrance_hall_consumption') | float(0) +
states('sensor.office_consumption') | float(0) +
states('sensor.hall_consumption') | float(0) +
states('sensor.troom_consumption') | float(0) +
states('sensor.sbathroom_consumption') | float(0) +
states('sensor.toilet_consumption') | float(0) +
states('sensor.adams_room_consumption') | float(0))
| round(2) }}
availability: >
{{ states('sensor.bbathroom_consumption') | is_number and
states('sensor.livingroom_consumption') | is_number and
states('sensor.bedroom_consumption') | is_number and
states('sensor.cloakroom_consumption') | is_number and
states('sensor.entrance_hall_consumption') | is_number and
states('sensor.office_consumption') | is_number and
states('sensor.hall_consumption') | is_number and
states('sensor.troom_consumption') | is_number and
states('sensor.sbathroom_consumption') | is_number and
states('sensor.toilet_consumption') | is_number and
states('sensor.adams_room_consumption') | is_number }}
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
- sensor:
- name: "HVAC Activity bbathroom"
state: "{{ state_attr('climate.big_bathroom_thermostat', 'hvac_action') }}"
- name: "HVAC Activity livingroom"
state: "{{ state_attr('climate.livingroom_thermostat', 'hvac_action') }}"
- name: "HVAC Activity adams"
state: "{{ state_attr('climate.adams_s_room_thermostat', 'hvac_action') }}"
- name: "HVAC Activity bedroom"
state: "{{ state_attr('climate.bedroom_thermostat', 'hvac_action') }}"
- name: "HVAC Activity cloakroom"
state: "{{ state_attr('climate.cloak_room_thermostat', 'hvac_action') }}"
- name: "HVAC Activity entrance hall"
state: "{{ state_attr('climate.entrance_hall_thermostat', 'hvac_action') }}"
- name: "HVAC Activity hall"
state: "{{ state_attr('climate.hall_thermostat', 'hvac_action') }}"
- name: "HVAC Activity office"
state: "{{ state_attr('climate.office_thermostat', 'hvac_action') }}"
- name: "HVAC Activity sbathroom"
state: "{{ state_attr('climate.small_bathroom_thermostat', 'hvac_action') }}"
- name: "HVAC Activity troom"
state: "{{ state_attr('climate.hysen_hy08we_2_thermostat', 'hvac_action') }}"
- name: "HVAC Activity toilet"
state: "{{ state_attr('climate.toilet_thermostat', 'hvac_action') }}"