cdpuk / ha-bestway

Home Assistant integration for Bestway / Lay-Z-Spa hot tubs
MIT License
70 stars 18 forks source link

Option for temperature setting in Automation #72

Open crankeith opened 2 weeks ago

crankeith commented 2 weeks ago

I've had a couple of power outages lately in my area which completely turns off and resets the spa settings. I've been able to set up an automation using this integration to turn it back on but there isn't an option to set the temperature for the action "Change HVAC Mode on Spa Thermostat".

Describe the solution you'd like For the Automation action "Change HVAC Mode on Spa Thermostat"

libtek commented 2 weeks ago

Would also be nice to trigger events upon temperature changes, as well as events for change to/from Celsius/Fahrenheit.

An event for Connected/Disconnected would be helpful as well. Ultimately, events for every change would be helpful for automations.

cdpuk commented 2 weeks ago

climate.set_hvac_mode is a built in HA action, so not something that can be changed by this integration. To set the temperature, you need to use the climate.set_temperature action, which conveniently does support both setting the temperature and changing the mode at the same time.

As for the points from @libtek, a HA automation can easily listen for any change to the current_temperature attribute. I don't understand the case for additional events to be raised when a state_changed event will be raised by any change to an entity, and this is what the automation systems works with.

The one thing that might be possible is a control to switch the spa between F/C.