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

preset mode being set on wrong entity #80

Closed
mbrevda opened this issue Oct 17, 2023 · 25 comments · Fixed by #131 or #135
Closed

preset mode being set on wrong entity #80

mbrevda opened this issue Oct 17, 2023 · 25 comments · Fixed by #131 or #135
Assignees
Labels
bug Something isn't working

Comments

@mbrevda
Copy link

mbrevda commented Oct 17, 2023

Hi - got a strange issue here. Looks like my preset modes are being set on the wrong entity. Notice how the "Dining Room" has two preset modes - and the boys room has none. I'm seeing this in other entities, too.
Screenshot 2023-10-17 at 9 44 37 AM

Here is the configuration for these two:

- platform: dual_smart_thermostat
  name: Boys Room
  heater: switch.boys_room_radiator
  cooler: switch.boys_room_air_conditioner
  target_sensor: sensor.boys_room_temperature_temperature
  min_cycle_duration: 60
  precision: .5
  min_temp: 20
  max_temp: 25
  heat_cool_mode: true
  away:
    temperature: 30
    target_temp_low: 50
    target_temp_high: 0

- platform: dual_smart_thermostat
  name: Dining Room
  heater: switch.dining_room_radiator
  target_sensor: sensor.dining_room_thermostat_temperature
  min_cycle_duration: 60
  precision: .5
  min_temp: 20
  max_temp: 25
  away:
    temperature: 15

Is this something on my end? Thanks!

@mbrevda
Copy link
Author

mbrevda commented Nov 2, 2023

bump - anything I can do to move this forward?

@swingerman swingerman added the bug Something isn't working label Mar 4, 2024
@swingerman swingerman self-assigned this Mar 4, 2024
@swingerman
Copy link
Owner

  • preset_modes are the available preset modes - based on your configuration.
  • preset_mode is the currently selected preset mode

@mbrevda
Copy link
Author

mbrevda commented Mar 8, 2024

I see
But why are some entites missing the preset_modes altogether?

@paulius2k
Copy link

@mbrevda have you defined any of the preset_modes in the configuration of your "boys_room" thermostat? Like away: or home:? If you haven't, then they will not be available for you.

@mbrevda
Copy link
Author

mbrevda commented Mar 10, 2024

Yes, I have - see yaml above

@paulius2k
Copy link

paulius2k commented Mar 10, 2024

Sorry, my bad for missing it.

Try fixing your temps in away preset:
target_temp_low: 50 0
target_temp_high: 0 50

This will fix your problem.

@mbrevda
Copy link
Author

mbrevda commented Mar 17, 2024

This will fix your problem.

I don't think it did?

Screenshot 2024-03-17 at 12 26 02 PM

@paulius2k
Copy link

I tried it in my setup, and it works. Then it could be some other parameter which is influencing this in your setup.:

P.S. sorry to ask, but you did remember to reload your yaml config after changes? :)

@mbrevda
Copy link
Author

mbrevda commented Mar 17, 2024

did remember to reload your yaml config after changes

Yes, I did, and also reloaded home assistant when I didn't see the changes.

I tried it in my setup, and it works

I'm sure. Where do I go from here?

@swingerman
Copy link
Owner

I detected an issue that the supported features are detected when you change HVAC modes. supported_features sets if the thermostat supports preset mode or not.
It's bugg. Working on the fix.
Will be out in 1-2 days

@swingerman swingerman reopened this Mar 17, 2024
@jkrasinger
Copy link

@mbrevda : As i can see in your yaml definition above, you must also specify the "temperature", not only "target_temp_low" and "target_temp_high", then it will work.

@mbrevda
Copy link
Author

mbrevda commented Mar 18, 2024

even in heat_cool mode? What would temperature be in that case?

@swingerman
Copy link
Owner

swingerman commented Mar 18, 2024

Wait with this @mbrevda.
I am currently working on this.

I plan to release a beta today or tomorrow.

swingerman pushed a commit that referenced this issue Mar 18, 2024
swingerman pushed a commit that referenced this issue Mar 18, 2024
@swingerman
Copy link
Owner

v0.9.5-beta.1 is out

@mbrevda
Copy link
Author

mbrevda commented Mar 19, 2024

v0.9.5-beta.1 is out

Thank you - it does not seem to have resolved the issue, though:

Screenshot 2024-03-19 at 9 30 38 AM

@swingerman
Copy link
Owner

The only potential problem that I can see at this point is that the target_temp_high is higher than the max_temp

But I will take your config tomorrow and see. The supported_features: 129 seems to indicate that preset modes are not supported.

swingerman pushed a commit that referenced this issue Mar 21, 2024
@swingerman
Copy link
Owner

swingerman commented Mar 21, 2024

Please check v0.9.5-beta.3

I managed to reproduce and fix the issue. I also added a test to cover it.

@mbrevda
Copy link
Author

mbrevda commented Mar 27, 2024

I appreciate the efforts, but afraid the presets still aren't registering...

Screenshot 2024-03-27 at 8 41 55 AM

@swingerman swingerman reopened this Apr 5, 2024
@swingerman swingerman pinned this issue Apr 5, 2024
@swingerman
Copy link
Owner

Can you confirm that you use the same configuration that you used earlier?

@mbrevda
Copy link
Author

mbrevda commented Apr 10, 2024

Exactly the same

@swingerman
Copy link
Owner

Mirroring your confirmation, I can't reproduce the issue.
There may be some old state that was misconfigured and gets applied back.

Could you create a duplicate of boys room config with a different name and see?

@swingerman swingerman unpinned this issue Apr 19, 2024
@mbrevda
Copy link
Author

mbrevda commented May 24, 2024

Apologies for the long response time.

So yeah, this is weird. Merely changing the name allows the presets to be loaded on the device, but changing the name back removes them. What gives?

@swingerman
Copy link
Owner

Some saved state, probably saved with a buggy version, is being restored. Introducing a new name uses a new state and saved state.
Using the new name is the way to go forward.

@mbrevda
Copy link
Author

mbrevda commented May 24, 2024

is there a way to remove said state?

@mbrevda
Copy link
Author

mbrevda commented May 24, 2024

Got it... finally!
I needed to stop ha (from the cli, via ssh) and remove the entity from .storage/core.restore_state. Then recreated the device and it's finally showing the preset states. Thanks for your help and patience in working though this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants