-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fahrenheit temperatures not converted properly #47
Comments
Hello, which temperature unit do you use in HA? |
Hi, it's set to Fahrenheit.
…On Mon, Jul 1, 2024, 12:55 AM litinoveweedle ***@***.***> wrote:
Hello, which temperature unit do you use in HA?
—
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AECNU7GCJZATX7ES267OORTZKEDOXAVCNFSM6AAAAABKESAKBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJZGQ4DENRQGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
OK, seems to be error on the side of the integration.
|
I can select from 61F to 84F. 64F logs 142 and 84F logs 183 so it looks like it's actually treating the Fahrenheit number as Celsius and then converting it to Fahrenheit. |
I edited
That fixes the problem. Do you need me to make a pull request? |
Hello, thank you for troubleshooting. Actually you can't use rounding, as integration supports all precision (half, tens, etc.) I have new PR for preset mode support ready to be merged and it changed a lot of lines around your fix. Will you be please able to check this branch? I would fix this into this branch and than merge it into master and release... BTW: this branch already uses |
Thanks, I'll try to test that out later today. I had some thoughts about the rounding that I'm not sure if you want to address. Fujitsu does whole number rounding in Celsius and when in Fahrenheit it only let's you set even numbers. It wouldn't surprise me if manufacturers who do half integer rounding in Celcius do whole integer rounding in Fahrenheit. I'm not super. Concerned with the number on the thermostat matching exactly what I set it to in HA but it's something to consider if that's the goal. |
Finding of the closest existing temperature is also implemented in the branch you are going to test. So please test it and report back as I want to release this version.🤞 |
Okay, I tested it and it works to control the AC. For whatever reason the degrees displayed on HA are 4 lower than what it shows on the thermostat. I didn't pay attention to whether that was happening with my patch but I'm guessing that it was. It's possible that's just an issue with the codes file. Looking forward to the next release! Thanks |
That is definitely not correct. I will prepare version with debug logging - would you be able to test it with debug on? |
updated version is ready here. Please enable debug logging by adding appropriate lines into HA configuration.yaml:
|
Here is the resulting log from sending 70 and then 66 which resulted in the thermostat showing 74 and then 70
|
Thank you for testing. Just to be sure, that I understand your report correctly:
|
No problem, so when I set it to 66 it stays on 66 in HA but my physical thermostat shows 70. That's why I'm pretty sure the issue is with the ir json file. Setting to an odd temperature doesn't do anything different. Setting it to 67 shows 67 on the HA climate card, logs |
I think I found the issue. I think it is fixed in latest version of the branch. Please note, that some of the other new changes are now present in the branch, so please:
|
It's now only letting me set even numbers and jumping in 2 degree increments which is correct. Here are the logs.
|
thank you for the test. I am still confused by this: To my understanding,
I am bit confused by some of the logs. This is how the full temperature change shall looks like:
This seems to be correct. EDIT: those are on/off actions....
And following change in temperature:
EDIT: so this seems to be OK for me completely. I am just still confused by the shift of the temperatures on your physical thermostat. How is this one connected to you HVAC device? Did you though about testing with HA global settings to C? Could you set your thermostat into C? |
The preset branch was now merged with the master. In case we will not find root cause for temperature difference in the code, I think that this issue could be closed. |
I think the incomplete one is changing the temperature while it's already on vs changing it and then switching it to cool from off. |
Ok, thanks for info. Are you OK with closing this issue now? If you will find anything new you are free to reopen it or create new - I would like to definitely fix this, but currently I am not ware of any problem in the code itself. |
I edited the json file and put it in custom codes and everything seems to be working properly. Thanks for addressing this! |
Hello I am also running into this issue with my Broadlink and using this fork of SmartIR with my Lennox minisplit system. I have figured out something must be going wrong with the detection of if the units should be converted somewhere along the way from C to F or vice versa. My thermostat is in F and I am using 2161.json as my "remote". When sending any command using HA through the thermostat card it converts my Fahrenheit temperature into Fahrenheit again using the Celsius to Fahrenheit conversion. I have witnessed this by setting my Mini Split using the thermostat card to 72F Cool and I can see in the HA logs that is erroring and returning:
using some quick math I realized that it is applying a conversion on my Fahrenheit temperature as if it was Celsius.
So it is somehow not seeing that my thermostat is already in Fahrenheit and is trying to convert it from Fahrenheit to Fahrenheit currently (thinking it is Celsius to Fahrenheit). If you need any more info please let me know, or if you would like me to open a new issue @litinoveweedle |
Did you install the latest master manually? I don't think the latest release on HACS includes the fix yet. |
I did not do it manually no. I will try that in the morning and report back. __ |
Hello, there is new pre-release available which contains all those fixes. |
Hello! Thank you for your support and maintaining this project. I have installed the latest pre-release 1.18.0b1 and I am still encountering the issue where it is only moving temperature by an increment of 2 degrees Fahrenheit. |
If your device file has temperatures in the whole Celsius degrees, then the given behaviour is completely correct. If you disagree please describe what your expected behaviour shall be. |
I understand where the problem is occurring now thank you for that last bit of information. It makes sense since the json for the device code is in Celsius as increments of 1 degree C that it changes by 2 in F when it is converted. To resolve my particular issue I will more than likely have to grab the IR codes from the Broadlink for the in between temperatures. Is it possible for me to create my device code json in Fahrenheit with every step in between 70,71,72,73..etc ? Or am I better off leaving it in Celsius and using half increments on the temperatures 17,17.5,18,18.5..etc ? |
You are completely correct, 😌 in most cases C converts directly to even F. Regarding your question, if your device supports command in F it is always better to records command in native units (units supported by device and IR remote) than to do any conversion. |
I'm trying to migrate over from the smartHomeHub/SmartIR (which was working okay other than not supporting Farenheit). I see the Readme mentions there may be some breaking changes but it's not clear what those are. I'm not using any custom codes and I'm getting the
ERROR (MainThread) [custom_components.smartir.climate] Missing device IR code for '158' target temperature.
logged when I try to control my AC. Here is my config:The text was updated successfully, but these errors were encountered: