Hive heating dashboard with custom boost function and heating usage graphs

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() }}

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.

2 Likes

Thanks for this, the history stats helpers were really interesting, I’d not used them before and will give me some nice graphs in the days/weeks/months to come!

Glad it can help! Yes they’re pretty cool. I played around with using utility meter helpers too but they round up and so are a bit inaccurate.

Well done!!
I am very new to this stuff and I have been trying to get this working for ages. Now I am almost there. Still trying to get

custom:mushroom-template-card
    primary: "{{state_attr('sensor.thermostat_boost', 'Boost ends in') }}"
    secondary: ""
    icon: mdi:timer-sand
    fill_container: true
    multiline_secondary: false
    layout: vertical
    tap_action:
      action: more-info
    icon_color: "#E83E8C"
    entity: binary_sensor.thermostat_boost

working on my system… but so much better now.

I might add a row to accommodate Hot Water…

Thanks so much for sharing

Glad you were able to get most of it working! I don’t have a hot water control but I hope you can easily include it.

For that part of it, have you added mushroom cards? You need to install it via HACS - GitHub - piitaya/lovelace-mushroom: Build a beautiful Home Assistant dashboard easily

If you haven’t set up HACS yet a guide can be found here - Initial configuration - HACS

You can also double check the attribute exists in your installation, if you go to developer tools and click states, you can search for the entity to see if the attribute is there:

image

It does exist, but all I seem to see is the little icon…

Oh that’s the wrong one, that’s the binary_sensor, you need to look for just ‘sensor’, so it’s ‘sensor.thermostat_boost’ :blush:

When it’s set on the dashboard it will only show a number when a boost is active.

Oh dear. It doesn’t seem to exist on my system… ??

I have 13 entities associated with Hive…

I have now downloaded the HACS Hive app and I can now see ‘sensor.thermostat_boost’

Still only seeing the timer icon…

Seems to work now… Thanks for your help.
One thing still puzzles me. What was your reasoning for having 2 methods of starting Boost…

BTW. Hot Water might cause me a problem, but that is more about me…

Ah glad you’ve got it working! Sorry I had forgotten that I was using the HACS Hive integration too, it must provide additional sensors that I wanted.

Do you mean the 30 mins and 1 hour buttons plus the modifiable temp/hours buttons? I have been using the 30 mins/1hour buttons for the past 18 months and have only recently added the custom boost section. I am keeping the quick 30 mins/1 hour buttons for now because sometimes I want to quickly turn the heating on briefly.