Skip to content

Commit

Permalink
Add temperature and humidity sensor for IR Remote #189
Browse files Browse the repository at this point in the history
  • Loading branch information
xZetsubou committed Mar 31, 2024
1 parent 0dfca6b commit 41fef89
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions custom_components/localtuya/core/ha_entities/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@ def localtuya_sensor(unit_of_measurement=None, scale_factor: float = 1) -> dict:
"wkcz": (
LocalTuyaEntity(
id=DPCode.HUMIDITY_VALUE,
# name="humidity",
name="Humidity",
device_class=SensorDeviceClass.HUMIDITY,
state_class=SensorStateClass.MEASUREMENT,
),
LocalTuyaEntity(
id=DPCode.TEMP_CURRENT,
# name="temperature",
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),
Expand Down Expand Up @@ -1291,14 +1291,14 @@ def localtuya_sensor(unit_of_measurement=None, scale_factor: float = 1) -> dict:
# Air Conditioner Mate (Smart IR Socket)
"wnykq": (
LocalTuyaEntity(
id=DPCode.VA_TEMPERATURE,
# name="temperature",
id=(DPCode.VA_TEMPERATURE, DPCode.TEMP_CURRENT, DPCode.TEMP_CURRENT_F),
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),
LocalTuyaEntity(
id=DPCode.VA_HUMIDITY,
# name="humidity",
id=(DPCode.VA_HUMIDITY, DPCode.HUMIDITY_VALUE),
name="Humidity",
device_class=SensorDeviceClass.HUMIDITY,
state_class=SensorStateClass.MEASUREMENT,
),
Expand Down Expand Up @@ -1473,6 +1473,7 @@ def localtuya_sensor(unit_of_measurement=None, scale_factor: float = 1) -> dict:
),
}


# Circuit Breaker
# https://developer.tuya.com/en/docs/iot/dlq?id=Kb0kidk9enyh8
SENSORS["dlq"] = SENSORS["zndb"]
Expand Down

0 comments on commit 41fef89

Please sign in to comment.