diff --git a/custom_components/tuya_ble/sensor.py b/custom_components/tuya_ble/sensor.py index fdc45e66..a5973a36 100644 --- a/custom_components/tuya_ble/sensor.py +++ b/custom_components/tuya_ble/sensor.py @@ -260,6 +260,61 @@ class TuyaBLECategorySensorMapping: ], }, ), + "zwjcy": TuyaBLECategorySensorMapping( + products={ + "gvygg3m8": [ # Smartlife Plant Sensor SGS01 + TuyaBLETemperatureMapping( + dp_id=5, + coefficient=10.0, + description=SensorEntityDescription( + key="temp_current", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), + ), + TuyaBLESensorMapping( + dp_id=3, + description=SensorEntityDescription( + key="humidity", + device_class=SensorDeviceClass.HUMIDITY, + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + ), + ), + TuyaBLESensorMapping( + dp_id=14, + description=SensorEntityDescription( + key="battery_state", + icon="mdi:battery", + device_class=SensorDeviceClass.ENUM, + entity_category=EntityCategory.DIAGNOSTIC, + options=[ + BATTERY_STATE_LOW, + BATTERY_STATE_NORMAL, + BATTERY_STATE_HIGH, + ], + ), + icons=[ + "mdi:battery-alert", + "mdi:battery-50", + "mdi:battery-check", + ], + ), + TuyaBLEBatteryMapping( + dp_id=15, + description=SensorEntityDescription( + key="battery_percentage", + device_class=SensorDeviceClass.BATTERY, + native_unit_of_measurement=PERCENTAGE, + entity_category=EntityCategory.DIAGNOSTIC, + state_class=SensorStateClass.MEASUREMENT, + ), + + ), + ], + }, + ), "znhsb": TuyaBLECategorySensorMapping( products={ "cdlandip": # Smart water bottle