Using binary_sensor trend to detect hot water tank emptying quickly

Be gentle please, I’m new!

As per the title, I’d like to automate turning my hot water on if the tank is emptying quickly. I’ve read the binary_sensor docs and configured as so:

binary_sensor:
  - platform: trend
    sensors:
      shower_on:
        entity_id: climate.hot_water
        sample_duration: 900
        min_gradient: -0.055555

The climate system is evohome, so really I wanted the entity_id to be climate.hot_water.current_temperature - but that gave me errors when validating config.

The sensor shows in hass but has sample_count is 0.

I’ve had a look through the source for binary_sensor, but I’m none the wiser - can anyone she any light please?

did you find a solution?

I have made a little progress, the introduction of attribute to the trend binary_sensor has enabled this:

binary_sensor:
  - platform: trend
    sensors:
      water_draining:
        entity_id: water_heater.dhw_controller
        attribute: current_temperature
        sample_duration: 1800