Open svkowalski opened 4 years ago
Sorry for late answer but I was busy on this last month. At this moment only integer values are accepted, but 3.47 is a very strange value. Are sure that your problem is not related to unit_of_measurement? Can you provide some example of value showed and expected?
Thanks for your response. I have unit_of_measurement set to '°F'.
As I recall, the original values reported by sensor.temperature were something like 275(? almost looks like Kelvin!) So I fiddled around with cur_temp_divider until I got to a reasonable value (91.7). After comparing to a known good thermometer (85), I factored the sensor value further by dividing by 1.19 to achieve the "correct" temp in the Lovelace dashboard view.
In other words, I can get the InkBird C929 Thermostat to report the temperature accurately by making one back-end calculation (curr_temp_divider: 3.47) and another for the front-end display (sensor.current_temperature / 1.19).
I suppose I could skip the back-end adjustment and revise the calculation on the sensor. It would just be more elegant if your curr_temp_divider would accept a float value.
Here is how I define the InkBird C929:
climate:
- platform: generic_thermostat
name: Office closet
# heater: climate.3417831284f3eb78e0b2
heater: climate.c929_thermostat
ac_mode: true
target_sensor: sensor.temperature
...and here is the sensor attribute:
value_template: >
{{ '%0.1f' | format(state_attr('climate.c929_thermostat', 'current_temperature') | float / 1.19 ) }}
Solved: After reworking my tuya_custom and sensor YAML settings, I found that I can just set the curr_temp_divider to 1. Then, I divide the current_temperature attribute by a value that results in a match to what the InkBird/SmartLife app is reporting.
So just update your document to clarify that the curr_temp_divider must be an integer/whole number, and not just "any positive number." No need to change any code.
Thanks again for looking into my issue.
BTW: Just saw that you have updated the integration & removed it from configuration.yaml.
I updated my HA configuration to 0.1.2 (running in 0.118.5) and everything--InkBird & Tuya LED lights--works fine.
Thanks again!
I think that 275 is 27.5 multiplied by 10 in Celsius.
If you just set temperature values divider = 10
and unit of measure = Celsius
in integration option probably you will have te right temperature.
First, let me say that your Custom Tuya integration works great with my SmartLife thermostat (InkBird C929). Just having a problem factoring the current temperature value. I determined that I need to divide the displayed value by 3.47 to match the true temp. However, despite the comment stating that "any positive number" can be entered, it appears that it only actually accepts an integer (in my case, either 3 or 4).
Here is my configuration.yaml entry: