ollo69 / ha_tuya_custom

Tuya Custom Component for testing
Apache License 2.0
39 stars 18 forks source link

Incorrect Readings on Thermostat #46

Closed sicXnull closed 4 years ago

sicXnull commented 4 years ago

Using a Sasswell (Tuya) thermostat

It appears to be showing Celsius as Fahrenheit, and it's also doubled. I've tried some of the known "Fixes" for this error but that does not appear to work out.

Halving current temp is 22.25 Celsius which is the correct temp in the house (72 F)

Looks like the math needs changed here to - (Current temp /2)× 9/5) + 32 as a dirty fix. I'm sure there's a better way to do it though.

image

ollo69 commented 4 years ago

Did you read the repository readme? You should set unit_of_measurement and temp_divider to fix this. If looks too complex to you manage configuration.yaml, be patient and wait for fix implementation in standard Tuya component that will allow to change parameter using UI.

sicXnull commented 4 years ago

tbh no, noob moment. Found the repo and installed it. I will work with those.

sicXnull commented 4 years ago

Changes don't seem to work. Pulled debug

2020-10-19 20:44:58 DEBUG (SyncWorker_52) [custom_components.tuya_custom.tuyaha.tuyaapi] Tuya request response: {'payload': {'data': {'current_temperature': 692, 'min_temper': 50, 'temperature': 700, 'max_temper': 950, 'online': True, 'state': 'true'}}, 'header': {'code': 'SUCCESS', 'payloadVersion': 1}}

ollo69 commented 4 years ago

What does not work? What is your configuration?

sicXnull commented 4 years ago

No change in temp. Should be showing 72 F or at the very least 22 C. Changing divider / unit_of_measurement is not changing anything.

image


tuya_custom:
  devices_config:
    - device_name: Home Thermostat
      unit_of_measurement: F
      temp_divider: 2
      curr_temp_divider: 2
ollo69 commented 4 years ago

Are you sure that name is "Home Thermostat"? Can you show me device page?

sicXnull commented 4 years ago

Nice - That fixed it kinda.

Just needs decimal now. (Ex 69.2 F)

image

ollo69 commented 4 years ago

temp_divider: 10

sicXnull commented 4 years ago

There it is! Thanks for the help