Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sensor current-consumption:
- - platform: template
- sensors:
- gas_heating_current_consumption:
- friendly_name: "Gas Heating Current Consumption"
- unit_of_measurement: "W"
- value_template: >
- {% if state_attr('climate.hall', 'hvac_action') == 'heating' %}
- 18500
- {% elif state_attr('climate.hall', 'hvac_action') == 'off' %}
- 0
- {% endif %}
- #Gas Heating Sensor for usage
- #gives an on/off state for the calling for heat (not main on/off of device)
- central_heating_heating_state:
- friendly_name: "Central Heating Heat State"
- value_template: >
- {% if state_attr('climate.hall', 'hvac_action') == 'heating' %}
- ON
- {% elif state_attr('climate.hall', 'hvac_action') == 'off' %}
- OFF
- {% elif state_attr('climate.hall', 'hvac_action') == 'idle' %}
- OFF
- {% endif %}
- - platform: integration
- source: sensor.gas_heating_current_consumption
- name: gas_heating_total_consumption
- unit_prefix: k
- round: 2
- method: left
- # These are the sensors that feed into lovelace and give a value of KWH used
- utility_meter:
- hourly_gas_heating_energy:
- source: sensor.gas_heating_total_consumption
- name: Gas Heating - Current Hour
- cycle: hourly
- daily_gas_heating_energy:
- source: sensor.gas_heating_total_consumption
- name: Gas Heating - Today
- cycle: daily
- weekly_gas_heating_energy:
- source: sensor.gas_heating_total_consumption
- name: Gas Heating - This Week
- cycle: weekly
- monthly_gas_heating_energy:
- source: sensor.gas_heating_total_consumption
- name: Gas Heating - This Month
- cycle: monthly
- yearly_gas_heating_energy:
- source: sensor.gas_heating_total_consumption
- name: Gas Heating - This Year
- cycle: yearly
- sensor:
- # Rad Demand and Heating Called history stats
- - platform: history_stats
- name: Heating On Today
- entity_id: sensor.central_heating_heating_state
- state: "ON"
- type: time
- start: "{{ now().replace(hour=0, minute=0, second=0) }}"
- end: "{{ now() }}"
- - platform: history_stats
- name: Heating On Yesterday
- entity_id: sensor.central_heating_heating_state
- state: "ON"
- type: time
- end: "{{ now().replace(hour=0, minute=0, second=0) }}"
- duration:
- hours: 24
- - platform: history_stats
- name: Heating On Current Week
- entity_id: sensor.central_heating_heating_state
- state: "ON"
- type: time
- start: "{{ as_timestamp( now().replace(hour=0, minute=0, second=0) ) - now().weekday() * 86400 }}"
- end: "{{ now() }}"
- # - platform: history_stats
- # name: Rads On Today
- # entity_id: binary_sensor.radiator_demands_heat
- # state: "on"
- # type: time
- # start: "{{ now().replace(hour=0, minute=0, second=0) }}"
- # end: "{{ now() }}"
- # - platform: history_stats
- # name: Rads On Yesterday
- # entity_id: binary_sensor.radiator_demands_heat
- # state: "on"
- # type: time
- # end: "{{ now().replace(hour=0, minute=0, second=0) }}"
- # duration:
- # hours: 24
- # - platform: history_stats
- # name: Rads On Current Week
- # entity_id: binary_sensor.radiator_demands_heat
- # state: "on"
- # type: time
- # start: "{{ as_timestamp( now().replace(hour=0, minute=0, second=0) ) - now().weekday() * 86400 }}"
- # end: "{{ now() }}"
- # extract current and target temps from rad valves
- - platform: template
- sensors:
- lounge_current_temp:
- friendly_name: "Lounge Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_lounge.attributes.current_temperature }}"
- lounge_target_temp:
- friendly_name: "Lounge Target Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_lounge.attributes.current_heating_setpoint }}"
- dining_room_current_temp:
- friendly_name: "Dining Room Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_dining_room.attributes.current_temperature }}"
- dining_room_target_temp:
- friendly_name: "Dining Room Target Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_dining_room.attributes.current_heating_setpoint }}"
- bedroom_current_temp:
- friendly_name: "Bedroom Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_bedroom.attributes.current_temperature }}"
- bedroom_target_temp:
- friendly_name: "Bedroom Target Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_bedroom.attributes.current_heating_setpoint }}"
- office_current_temp:
- friendly_name: "Office Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_office.attributes.current_temperature }}"
- office_target_temp:
- friendly_name: "Office Target Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_office.attributes.current_heating_setpoint }}"
- chloe_current_temp:
- friendly_name: "Chloe Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_chloe.attributes.current_temperature }}"
- chloe_target_temp:
- friendly_name: "Chloe Target Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_chloe.attributes.current_heating_setpoint }}"
- charlie_current_temp:
- friendly_name: "Charlie Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_charlie.attributes.current_temperature }}"
- charlie_target_temp:
- friendly_name: "Charlie Target Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_charlie.attributes.current_heating_setpoint }}"
- play_room_current_temp:
- friendly_name: "Play Room Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_play_room.attributes.current_temperature }}"
- play_room_target_temp:
- friendly_name: "Play Room Target Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_play_room.attributes.current_heating_setpoint }}"
- cinema_room_current_temp:
- friendly_name: "Cinema Room Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_cinema_room.attributes.current_temperature }}"
- cinema_room_target_temp:
- friendly_name: "Cinema Room Target Temp"
- unit_of_measurement: "°C"
- value_template: "{{ states.climate.radiator_cinema_room.attributes.current_heating_setpoint }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement