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

Can't set standalone presets in HA 2024.04.3 #444

Closed
chriske opened this issue Apr 12, 2024 · 15 comments
Closed

Can't set standalone presets in HA 2024.04.3 #444

chriske opened this issue Apr 12, 2024 · 15 comments
Labels
bug Something isn't working developed When development is done and tested P1 Priority 1

Comments

@chriske
Copy link

chriske commented Apr 12, 2024

I'm trying to:
Set temperatures for not central managed thermostat.

image

As you can see, HA won't set it, because of a type issue. I tried with 23,0 and 23.0 but getting the same issue. Also tried to modify the values directly for the entities, but the issue is the same.

I installed your integration yesterday for 2024.04.2 and I was able to set presets for the central component. Today after the update I tried to create a new thermostat with it's own presets, but I run into this issue.

@jmcollin78
Copy link
Owner

Hello @chriske ,

I will try with 2024.04.2 to see if something change. It keep you in touch.
What is not normal in your screen copy, is that all temperature are empty. And because the error log says "NoneType" I guess you try to send an empty temperature on some Number entity.

Maybe you can try to put some value to all other temperature.

@chriske
Copy link
Author

chriske commented Apr 13, 2024

Hello @chriske ,

I will try with 2024.04.2 to see if something change. It keep you in touch. What is not normal in your screen copy, is that all temperature are empty. And because the error log says "NoneType" I guess you try to send an empty temperature on some Number entity.

Maybe you can try to put some value to all other temperature.

Hi! Thanks for the response! I tried to populate every input but I'm getting the same issue for every one.

@jmcollin78 jmcollin78 added question Further information is requested P1 Priority 1 labels Apr 13, 2024
@jmcollin78
Copy link
Owner

Hello, I have tested with HA 2024.4.3 and all is working fine on my side. Something went wrong on your environment (all temperature are empty which is not possible). I suggest to check logs. There is surely some messages explaining what goes wrong.

I will close the issue because it is not a VTherm issue but please post the logs messages here when you have.

@jmcollin78 jmcollin78 added the not reproduced Not reproduced label Apr 16, 2024
@chriske
Copy link
Author

chriske commented Apr 16, 2024

Hi there!

Thanks for checking!

Here are the logs when I try to set any temperature:

2024-04-16 18:30:38.074 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140282818477248] float() argument must be a string or a real number, not 'NoneType'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/number/init.py", line 112, in async_set_value
await entity.async_set_native_value(native_value)
File "/config/custom_components/versatile_thermostat/number.py", line 462, in async_set_native_value
old_value = float(self._attr_native_value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: float() argument must be a string or a real number, not 'NoneType'

As far as I can see, the exception's origin is the number.py class

@chriske
Copy link
Author

chriske commented Apr 16, 2024

One more clue:

I tried to create a new VTherm, and now I choosed to not use the min and max temperatures from central config. Now my temperatures are populated and I can change them:

image

After this experiment, I changed my previously posted VTherm's settings to not copy the central temperatures and it started to work.

@jmcollin78
Copy link
Owner

Ooooh this is a great news.
What do you mean by " I choosed to not use the min and max temperatures from central config" ?
Can you send me screen copy of how you do that (because it seems related to the issue) ?

I changed my previously posted VTherm's settings to not copy the central temperatures

Does that means that you uncheck this checkbox (in french sorry) ?

Capture d’écran 2024-04-17 à 08 15 40

@chriske
Copy link
Author

chriske commented Apr 17, 2024

Ooooh this is a great news. What do you mean by " I choosed to not use the min and max temperatures from central config" ? Can you send me screen copy of how you do that (because it seems related to the issue) ?

I changed my previously posted VTherm's settings to not copy the central temperatures

Does that means that you uncheck this checkbox (in french sorry) ?

Capture d’écran 2024-04-17 à 08 15 40

Exactly :) thanks!

@jmcollin78
Copy link
Owner

And for the min/max what have you done ?

@chriske
Copy link
Author

chriske commented Apr 17, 2024

These are my settings for the central configuration:

image

@jmcollin78
Copy link
Owner

This was not my question. You said, you have done something with the min and max temperature. For me they are defined here:
Capture d’écran 2024-04-17 à 09 39 35

But maybe there is a misunderstanding somewhere.

@chriske
Copy link
Author

chriske commented Apr 17, 2024

Yes, it seems we misunderstood each other somewhere. So, I will summarize everything I have done:

First, I created a central configuration where I set up the outdoor thermometer, the minimum and maximum temperatures, and the step. To the presets created this way, I set the appropriate temperatures. After that, I made 2 VTherms, of the climate type, and set each to use the central configuration. These are working nicely. Following that, I created a third VTherm, for which I set that I wanted to define my own presets, but I left the "use additional central configuration" switch turned on in the underlyings menu. If the new VTherm is created this way, then I cannot set the temperatures for the presets, that’s when I get the above exception. If I turn off "use additional central configuration" afterwards, then I can set the temperatures in the presets created for the VTherm.

This is how it works:
image

@brunoleon
Copy link

Hello,

I'm facing the same issue, and I did two videos to try to explain the behavior.

TLDR: if you do select "Use additional central main configuration" when creating a device, you won't be able to use device specific presets afterwards.

vtherm_central_then_not.mp4
vtherm_not_central.mp4

@jmcollin78
Copy link
Owner

Thanks @brunoleon for the reproduction case. I will able to reproduce and to fix now !

@jmcollin78 jmcollin78 reopened this Apr 17, 2024
@jmcollin78 jmcollin78 added bug Something isn't working and removed question Further information is requested not reproduced Not reproduced labels Apr 17, 2024
jmcollin78 added a commit that referenced this issue Apr 23, 2024
* HA 2024.4.3 and release

* [#444] - fix initial temp values with standalone presets

---------

Co-authored-by: Jean-Marc Collin <jean-marc.collin-extern@renault.com>
@jmcollin78 jmcollin78 added the developed When development is done and tested label Apr 23, 2024
@jmcollin78
Copy link
Owner

@chriske
Copy link
Author

chriske commented Apr 23, 2024

Thank you for the fix and your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working developed When development is done and tested P1 Priority 1
Projects
None yet
Development

No branches or pull requests

3 participants