ScratMan / HASmartThermostat

Smart Thermostat with PID controller for HomeAssistant
336 stars 48 forks source link

Allow for input_number as heater entity #123

Closed mezger6 closed 3 months ago

mezger6 commented 1 year ago

Hello and congratulations for your very good work!

While trying out the latest feature for a 0-100% heater entity when pwm is set to zero, it turns out that input_number helpers cannot be used. This is because the 'set_value' service is called always under the 'number' domain - if it could be conditionally called under the 'input_number' domain as well, it would also work with helpers.

My use case is radiators heated by a gas boiler connected with opentherm gateway(OTGW), without an external thermostat. HA controls the water temperature setpoint via a service provided by the OTGW integration. The 0-100% output of the smart thermostat is mapped to the min-max water temperature (30 to 75 in my case) and then sent to the boiler via an automation that calls the service.

Up to now I use the control_output atttribute directly, and a dummy switch for the heater entity. It works quite well, but it would be cleaner and better to have an input_number helper receive the 0-100% output and use that to control the boiler. I imagine there would be other use cases where an intermediary needs to receive the output.

Thank you for your consideration

ScratMan commented 1 year ago

Hello, what is the ID of your heater entity when using input_number ? I may select the right domain by looking for it in the entity ID.

mezger6 commented 1 year ago

That's a good idea, the id is input_number.thermostat_control_output

vaproloff commented 1 year ago

@mezger6 Hello! I use mqtt number instead. Also tried input_number first, but it's not working. I am also support your idea, input_number would be better.

Chupaka commented 1 year ago

Hello there! I have the same problem, and turns out I'd better ask for a possibility to omit heater entity at all, because in an automation rule I recalc 0-100 of control_output into necessary range and assign to the entity I need. So I need to create a template switch to use it for nothing except providing to the smart thermostat as dummy output.