Hi all,
I have been using the Hive integration for a while and tend to use the boost function more than the schedule and wanted the ability to be able to configure the boost on the dashboard in the same way as the Hive app.
I have also tried to replicate the Hive usage graphs by using history helpers. I would like to do some analysis or comparisons in the future but haven’t got round to that yet!
Hive dashboard section
Find the yaml here: Github gist
Description:
Heating - shows whether the heating is currently on or off (i.e. if the current temp is below the target temp)
Boost off: Turns the current boost off
Minutes: Number of minutes remaining of the current boost
Target temp: The current target temp of the thermostat
Current temp: The current temp of the thermostat
Boost 30 mins: Boosts for 30 mins to 21 °C
Boost 1 hour: Boosts for 1 hour to 21 °C
Boost - Hours: Number of hours to boost for
Boost - Temp: Temperature to boost to
Boost: Whether the boost is active or not
Requirements:
- Hive HACS integration - this provides additional sensors compared to the core component
- Mushroom cards (HACS)
- Creation of a number helper named “thermostat boost hours”, set the step size to 0.5 (or less if you’d like)
- Creation of a number helper named “thermostat boost temperature”, set the step size to 0.5 (or less if you’d like)
- Creation of a script named “heating boost with inputs” with the following code:
alias: Boost heating with inputs
sequence:
- action: hive.boost_heating_on
metadata: {}
data:
entity_id: climate.thermostat
time_period: |
{% set m = (states('input_number.thermostat_boost_hours')|float * 60)%}
{{'%02i:%02i:%02i'%(m/60,m%60,(60*m)%60) }}
temperature: |
{{ float(states('input_number.thermostat_boost_temperature')) }}
A script was required as using a button to call an action didn’t seem to accept variables for time and temperature.
Heating graphs
Find the yaml here: Github gist
Requirements:
- Hive integration
- Apex charts integration (HACS)
- Creation of a template sensor to track if the heating is on or not. The device class is set to measurement to persist the data as the standard hive entity histories are wiped according to the recorder settings
Yaml for templates/config.yaml
- sensor:
- name: "Heating On"
state_class: measurement
state: >
{% if states.binary_sensor.thermostat_state.state == 'off' %}
0
{% elif states.binary_sensor.thermostat_state.state == 'on' %}
1
{% endif %}
- Creation of history stats helpers to track the period you’d like to graph. I have created daily, weekly and monthly helpers. Set the entity to ‘heating_on’ and the state to ‘1’. This sensor will only start tracking from when it is created and is not backdated.
- Daily - start:
{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}
- Weekly- start:
{{ today_at('00:00') - timedelta(days=now().weekday()) }}
- Monthly - start:
{{ today_at('00:00').replace(day=1) }}
- All - end:
{{ now() }}
- Daily - start:
Hope this helps someone else replicate the Hive app functionality!
Optional: I also created a boolean toggle on my home screen to show/hide the heating sections for summer when I won’t need them anymore.
Note: I am very much a hobbyist especially with coding, this may not be the most efficient way of doing it but I have found it to work for me.