Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic thermostat issue with Heat/Turn Off #42

Closed
nelim opened this issue Oct 30, 2020 · 13 comments
Closed

Generic thermostat issue with Heat/Turn Off #42

nelim opened this issue Oct 30, 2020 · 13 comments

Comments

@nelim
Copy link

nelim commented Oct 30, 2020

Hello,
I have issue setup scheduler to switch between Heat and Turn Off
Posting screenshots below.
Generic Thermostat, which is working fine, but Scheduler only set_temperature for hvac_mode: heat to 23, without switching mode with set_hvac_mode: heat
Is this normal behavior and how can I use Scheduler to just turn off and turn back on General Thermostat ?

  • service: set_hvac_mode
    entity: climate.stove
    hvac_mode: 'off'
  • service: set_temperature // Shouldn't this also set_hvac_mode to heat, not only changing temperature ?
    entity: climate.stove
    hvac_mode: heat
    temperature: 23

Thanks in advance.

PS. Otherwise, everything else is OK, i'm using your Scheduler with another MaxCube thermostat and works find, triggering OK, the problem is General Thermostat does not have Auto or On mode, just Heat and Turn Off
Screenshot from 2020-10-30 20-01-57
Screenshot from 2020-10-30 20-01-34
Screenshot from 2020-10-30 20-02-31

@issue-label-bot
Copy link

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@nielsfaber
Copy link
Owner

I'm not sure what is the problem exactly.

Generic Thermostat, which is working fine, but Scheduler only set_temperature for hvac_mode: heat to 23, without switching mode with set_hvac_mode: heat

In your actions list i see the complete service call, which sets hvac_mode: heat and temperature: 23.
Is this wrong?

@nelim
Copy link
Author

nelim commented Oct 30, 2020

It only sets temperature to 23 for hvac_mode heat, but does not switch mode to Heat.

I'm not very sure but can we use
service: set_hvac_mode // instead of set_temperature
entity: climate.stove
hvac_mode: heat
temperature: 23

@nielsfaber
Copy link
Owner

okay.
That sounds more like a problem with your thermostat then.
Did you try making normal service call?
I mean, go to Developer tools -> Services
And then choose set_temperature
with the hvac_mode and temperature as service_data

Does this work?
Because that's what scheduler does..

@nelim
Copy link
Author

nelim commented Oct 30, 2020

okay.
That sounds more like a problem with your thermostat then.
Did you try making normal service call?
I mean, go to Developer tools -> Services
And then choose set_temperature
with the hvac_mode and temperature as service_data

Does this work?
Because that's what scheduler does..

It is working just fine, but only Set Temperature of Mode Heat to 21/22/23 , but not switching from Off to Heat mode.
How can i Turn back Generic Thermostat from Off to Heat with Scheduler ?
Screenshot from 2020-10-30 20-18-23

@nelim
Copy link
Author

nelim commented Oct 30, 2020

service: set_temperature --> this one change temperature of heat mode to 23 (ot whatever) without switching thermostat mode from OFF to Heat
entity: climate.stove
hvac_mode: 'heat"
temperature: 23

service: set_hvac_mode --> this one turn thermostat from Off to Heat
entity: climate.stove
hvac_mode: 'heat"

Both work from developer tools, but how can i make set_hvac_mode: 'heat' from Scheduler, it only change temperature ?

@nielsfaber
Copy link
Owner

nielsfaber commented Oct 30, 2020

If you really want it, you can add this to the card config:

customize:
  climate.stove:
    actions:
      - service: climate.set_hvac_mode
         name: set hvac mode manually
         variable:
           field: hvac_mode
           options:
             - value: off
                icon: power
             - value: heat
                icon: flame

But the idea is that HVAC_mode is automatically switched when using the set_temperature action.
That's why it is shown in HA as an option for the set_temperature service (and that option is set by scheduler).
It seems that your climate entity has a limitation here.

@nelim
Copy link
Author

nelim commented Oct 30, 2020

Sorry, it is not general but generic thermostat :)

  • platform: generic_thermostat
    And yes.. i've tried with maxcube thermostat, if you are Off and set_temperature, it turn it back to heat.. but on generic thermostat it does not work, i'm also using Slider from card and thermostat always stay at Off, no matter i'm changing temperature, will try with that customize (i'm not sure it can work ont generic_thermostat) and will write you back.
    Thanks in advance.
    https://www.home-assistant.io/integrations/generic_thermostat/

This is my thermostat:

climate:

  • platform: generic_thermostat
    name: Stove
    heater: switch.stove
    target_sensor: sensor.livingroom_temperature
    min_temp: 17
    max_temp: 32
    ac_mode: false
    target_temp: 21
    cold_tolerance: 0.3
    hot_tolerance: 0.5
    initial_hvac_mode: "off"
    away_temp: 16

@nelim nelim changed the title General thermostat issue with Heat/Turn Off Generic thermostat issue with Heat/Turn Off Oct 30, 2020
@nelim
Copy link
Author

nelim commented Oct 30, 2020

Do I need to post this on "scheduler-card" now?

Modes not show up for variable hvac_mode, can you help please?
I also tried with example from github - does not work also i can choose "set mode" but nothing shows up after

customize:
climate.stove:
name: My thermostat
icon: thermometer
actions:
- service: set_hvac_mode
name: Set mode
icon:
variable:
field: hvac_mode
name: Operation mode
options:
- value: heat
icon: fire
- value: cool
icon: snowflake
- value: 'off'
icon: power
Maybe there is problem with Generic Thermostat on scheduler-card also?
ps. no, this does not work with maxcube thermostat also.. without this - there is "Set Mode" with Auto, after i try to customize, no modes available.

Screenshot from 2020-10-30 21-34-18
Screenshot from 2020-10-30 21-38-34

@nelim
Copy link
Author

nelim commented Oct 30, 2020

Ok, looks like there is a bug in Generic Thermostat, i cannot set temperature and change mode with one action/call and need 2 separate.
Thanks, i'm closing this.

@nelim nelim closed this as completed Oct 30, 2020
@andreipopovici
Copy link

@nelim Could you expand on how you fixed or got around the Generic Thermostat bug? I am seeing the same issues.

@nielsfaber
Copy link
Owner

I see that the thermostat doesn't check for the hvac_mode parameter in the set_temperature service:
https://github.com/home-assistant/core/blob/8868028dcdc99b5272cb100f26367eb785b426ef/homeassistant/components/generic_thermostat/climate.py#L342

The fix is quite easy, it's a matter of calling async_set_hvac_mode as well (which is defined 10 lines above it), with the provided ATTR_HVAC_MODE.

I recommend to make a PR with this change or open an issue about it in HA/core.

@nelim
Copy link
Author

nelim commented Nov 2, 2020

@nelim Could you expand on how you fixed or got around the Generic Thermostat bug? I am seeing the same issues.

@andreipopovici workaround, i'm not turning it off, scheduler just switching temperature and i'm using 17 instead of turn off :)

@nielsfaber thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants