-
Notifications
You must be signed in to change notification settings - Fork 726
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
Add Tuya Namron thermostat _TZE204_p3lqqy2r
#3625
Add Tuya Namron thermostat _TZE204_p3lqqy2r
#3625
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3625 +/- ##
==========================================
+ Coverage 89.85% 89.89% +0.03%
==========================================
Files 321 322 +1
Lines 10374 10407 +33
==========================================
+ Hits 9322 9355 +33
Misses 1052 1052 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
_TZE204_p3lqqy2r
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think we can go with this.
In the future, I wanna look into exposing (basic) climate devices directly via quirks v2 potentially.
.tuya_sensor( | ||
dp_id=120, | ||
attribute_name="current", | ||
type=t.int16s, | ||
divisor=10, | ||
device_class=SensorDeviceClass.CURRENT, | ||
state_class=SensorStateClass.MEASUREMENT, | ||
unit=UnitOfElectricCurrent.AMPERE, | ||
translation_key="current", | ||
fallback_name="Current", | ||
) | ||
.tuya_sensor( | ||
dp_id=121, | ||
attribute_name="voltage", | ||
type=t.int16s, | ||
device_class=SensorDeviceClass.VOLTAGE, | ||
state_class=SensorStateClass.MEASUREMENT, | ||
unit=UnitOfElectricPotential.VOLT, | ||
translation_key="voltage", | ||
fallback_name="Voltage", | ||
) | ||
.tuya_sensor( | ||
dp_id=122, | ||
attribute_name="power", | ||
type=t.int16s, | ||
device_class=SensorDeviceClass.POWER, | ||
state_class=SensorStateClass.MEASUREMENT, | ||
unit=UnitOfPower.WATT, | ||
translation_key="power", | ||
fallback_name="Power", | ||
) | ||
.tuya_sensor( | ||
dp_id=123, | ||
attribute_name="energy", | ||
type=t.int16s, | ||
divisor=100, | ||
device_class=SensorDeviceClass.ENERGY, | ||
state_class=SensorStateClass.TOTAL, | ||
unit=UnitOfEnergy.KILO_WATT_HOUR, | ||
translation_key="energy", | ||
fallback_name="Energy", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uh, I missed this too: I think we do not want a translation_key
for these, as HA will use the device_class
name by default.
We should remove the translation_key
for these four sensors.
EDIT: See #3630
Proposed change
Adds _TZE204_p3lqqy2r
Additional information
Fixes: #2868
Closes: #3565
Checklist
pre-commit
checks pass / the code has been formatted using Black