Add Tuya light platform#15444
Conversation
MartinHjelmare
left a comment
There was a problem hiding this comment.
Looks good. Two small comments.
| @property | ||
| def unique_id(self): | ||
| """Return a unique ID.""" | ||
| return 'tuya.' + self.tuya.object_id() |
There was a problem hiding this comment.
Please use string formatting.
return 'tuya.{}'.format(self.tuya.object_id())|
|
||
| TUYA_TYPE_TO_HA = { | ||
| 'switch': 'switch' | ||
| 'switch': 'switch', |
|
@MartinHjelmare |
|
Yeah, that looks good. I missed that it was a url. |
|
Make sure to add a docs PR. |
|
@MartinHjelmare Please do not merge when you think or know the documentation is missing. |
|
Yes, I missed to check this time. |
|
Dears, I updated to HA 0.74.2 and enabled Tuya component for my account. |
|
@huangyupeng can you add "cover" support por Tuya Smart? |
|
Feature and enhancement requests should go in the Feature Requests section of our community forum. Thanks! |
Description:
Add support for Tuya light. After configuring username and password and country code in Tuya component, home assistant can discover supported devices which related to user's Tuya account and control them through Tuya cloud service.
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices: