MindrustUK / Heatmiser-for-home-assistant

Heatmiser Neo-Hub / Neostat support for home-assistant.io
88 stars 33 forks source link

Hot water timer #199

Open BNWEIN opened 4 weeks ago

BNWEIN commented 4 weeks ago

Hey

I am sorry if this isnt the place to ask for support. I am a little confused how the hot water timer works. I have a device called "Kitchen Timer". I want to configure a button, that when i press the button a 1 hour override runs on that timer to turn the hot water on for an hour, but i cannot for the life of me figure out how i would do that ?

Any help appreciated!

thanks

ocrease commented 4 weeks ago

Hi @BNWEIN In order to set a timer override with a custom duration, you need to call the heatmiserneo.timer_hold_on action:

image

Or in YAML:

action: heatmiserneo.timer_hold_on
target:
  entity_id: switch.hot_water_heatmiser_neostat_v2_timer_override
data:
  hold_duration:
    hours: 1
    minutes: 0
    seconds: 0

If you want to cancel the hold, you would just call the standard switch.turn_off action.

How you call the service from a button is largely up to you and you can browse the Home Assistant forums for ideas. Here is a basic example that you could use.

  1. Create a script to call the service based on the current state (you can do it from the UI):

image This example uses a condition based on the hold_active sensor provided by the integration. When it is on, it calls the standard switch.turn_off service targeting the timer_override switch. Otherwise (eg when the hold is not active) it calls the heatmiserneo.timer_hold_on service with a 1 hour duration

  1. You can then create a button to display the hold state and call the script: image
show_name: true
show_icon: true
type: button
tap_action:
  action: perform-action
  perform_action: script.hot_water_boost_toggle
  target: {}
entity: switch.hot_water_heatmiser_neostat_v2_timer_hold
name: Hot Water Boost

Note if you wanted to just turn on the boost and don't need the ability to turn it off, you don't need the script. Just call the service directly from the button tap_action.

BNWEIN commented 4 weeks ago

OK. i am clearly an idiot! I still cannot get this working!

my script: (which i think is all correct)

alias: Hot Water Boost Toggle sequence:

My button (Which i think is wrong - in particular the entity)

show_name: true show_icon: true type: button tap_action: action: perform-action perform_action: script.hot_water_boost_toggle target: {} entity: switch.kitchen_timer_heatmiser_neoair_timer_override name: Hot Water Boost

Can you correct where i am wrong please?

Thank you!

BNWEIN commented 4 weeks ago

Scrap that, i got it working, there is just some weird funky delay which i think had me confused!

BNWEIN commented 4 weeks ago

PS thank you!

ocrease commented 4 weeks ago

@BNWEIN no problem, glad I could help. Just a few notes:

BNWEIN commented 4 weeks ago

@ocrease , just to be clear you mean this one?

sensor.kitchen_timer_heatmiser_neoair_hold_active

image

I dont have another "Hold" entity that would be relevant?

BNWEIN commented 4 weeks ago

I tried using sensor.kitchen_timer_heatmiser_neoair_hold_active instead, and whilst the functionality worked, the switch did not change colour to show if it was on or off.

ocrease commented 4 weeks ago

@BNWEIN yeah that's the one that I meant. But I notice it's a NeoAir (I have NeoStats) so the behaviour might be a bit different to what I expect.

I assume that after the ~30s delay it still didn't change colour?

I've been trying to add the ability to download diagnostics data which will help figure out what your setup looks like, but it's not quite ready for consumption (#200). It should also help with the other issue you raised #202.

BNWEIN commented 4 weeks ago

No after the 30 second delay it still didn't change, but i moved it back to switch.kitchen_timer_heatmiser_neoair_timer_override and that works as intended so no foul! :)

Thanks again for all your replies! I will leave you alone now for a bit :P

BNWEIN commented 2 weeks ago

Hey.

After updating to the pre release (2.0.0) my hot water button stopped working altogether. I have tried using both

switch.kitchen_timer_heatmiser_neoair_timer_override and sensor.kitchen_timer_heatmiser_neoair_hold_active

for the button, but neither worked. The timer no longer comes on for an hour, and the button never turns orange.

BNWEIN commented 2 weeks ago

I also noticed the below which might explain why it all stopped working.

image

BNWEIN commented 2 weeks ago

I have gone back to 1.6.0, the button works again, all my sensors are back but we are back to blue coloured thermostats.

image

ocrease commented 2 weeks ago

Hi @BNWEIN a lot of work has been done in the dev branch, specially with the timer devices. The main entity for a timer is now a select rather than a switch. You would need to look for something like select.kitchen_timer

There is a long discussion on #182 and if you really want the switch style there is a suggestion in https://github.com/MindrustUK/Heatmiser-for-home-assistant/issues/182#issuecomment-2465609635. You'll need to adapt it for your use case.

I suggest you go back to the prerelease version and delete all the entities that don't exist anymore (or just delete the integration entry and add it again)