home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.99k stars 29.64k forks source link

Tuya (SEA801-DF1) smart radiator thermostat target_temp_step set to 1 instead of 0.5 #32420

Closed atus42 closed 4 years ago

atus42 commented 4 years ago

The problem

Width tuya integration configured, the discovered smart radiator thermostat (SEA801-DF1) entity's target_temp_step parameter wrongly set to 1.

Environment

Problem-relevant configuration.yaml

tuya:
  username: atus42@gmail.com
  password: ****
  country_code: 36
  platform: tuya

Traceback/Error logs


climate.bfdcbeaf72ae6bfbe7zzoa | unknown | hvac_modes: off min_temp: 5 max_temp: 95 target_temp_step: 1 current_temperature: 24 temperature: 21 friendly_name: 4947 supported_features: 1

Additional information

In Tuya Smart Life app, I can set the room/target temp in 0.5 C° steps and actual temp is reported 0.1 C° precision. Screenshot_2020-03-03-00-59-48-626_com tuya smart

atus42 commented 4 years ago

Tested the tuya api with this code: https://github.com/PaulAnnekov/tuyaha/blob/master/tools/debug_discovery.py

The result json didn't contain more data, than HA show me, so the problem is with the integration itself. (tuyaha)

Got devices { u'header': { u'code': u'SUCCESS', u'payloadVersion': 1}, u'payload': { u'devices': [ { u'data': { u'current_temperature': 21, u'max_temper': 95, u'min_temper': 5, u'online': True, u'state': u'true', u'temperature': 21}, u'dev_type': u'climate', u'ha_type': u'climate', u'icon': u'https://images.tuyaeu.com/smart/program_category_icon/wk.png', u'id': u'bf88a38b43cae1ca740e09', u'name': u'4853'}, { u'data': { u'current_temperature': 22, u'max_temper': 95, u'min_temper': 5, u'online': True, u'state': u'true', u'temperature': 21}, u'dev_type': u'climate', u'ha_type': u'climate', u'icon': u'https://images.tuyaeu.com/smart/program_category_icon/wk.png', u'id': u'bfdcbeaf72ae6bfbe7zzoa', u'name': u'4947'}], u'scenes': []}}

I will continue to dig it further. Probably the payloadVersion should be greater, or the header should contain more fields to get more data.

atus42 commented 4 years ago

Well... I don't know if the underlying tuyaha api is able to do suck thing (give more detail) at this stage. Whith another code codetheweb/tuyapi it looks possible. It apperas that the basic problem with the tuyaha api is that it reads (and writes) a less precise property that the device has.

From the device raw dps data I can read the correct, more precise information (saved to an xml file as a json data). I wrote this information on the tuyaha issues page too, but no answer arrived so far. https://github.com/PaulAnnekov/tuyaha/issues/25

stale[bot] commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

atus42 commented 4 years ago

It turned out, that the tuya provided api (that tuyaha uses) did't provide more information, so without tuya improving their api, this is not possible. :(