tydom2mqtt icon indicating copy to clipboard operation
tydom2mqtt copied to clipboard

Tysense: missing state_class ; unit_of_measurement and device_class

Open vchatela opened this issue 7 months ago • 0 comments

Hello J'ai deux tysense (lightpower et outtemperature) mais les deux remontent sans état et comme des valeurs brutes. Il ne doit pas manquer grand chose pour remonter correctement:

Actuellement:

friendly_name: Tysense Sun 1 lightPower

friendly_name: Tysense Thermo 1 outTemperature

Proposition:

friendly_name: Tysense Sun 1 lightPower
state_class: measurement
unit_of_measurement: W
device_class: power

friendly_name: Tysense Thermo 1 outTemperature
state_class: measurement
unit_of_measurement: °C
device_class: temperature

Dans les logs la valeur remonte brute et pas en json

2025-03-10 11:30:04,491 - gmqtt.client         - DEBUG   - [CMD 0x30] b'\x00,light/tydom/1388538100_1388538100/attributes\x00{"device_id": 1388538100, "endpoint_id": 1388538100, "id": "1388538100_1388538100", "light_name": "Cuisine ", "name": "Cuisine ", "device_type": "light", "thermicDefect": false, "level": 0, "onFavPos": false}'
2025-03-10 11:30:04,491 - gmqtt.client         - DEBUG   - [RECV light/tydom/1388538100_1388538100/attributes with QoS: 0] b'\x00{"device_id": 1388538100, "endpoint_id": 1388538100, "id": "1388538100_1388538100", "light_name": "Cuisine ", "name": "Cuisine ", "device_type": "light", "thermicDefect": false, "level": 0, "onFavPos": false}'
2025-03-10 11:30:04,491 - gmqtt.mqtt.utils     - DEBUG   - FREE MID: None
2025-03-10 11:30:04,491 - gmqtt.client         - DEBUG   - [CMD 0x30] b'\x009sensor/tydom/lightPower_tydom_1740773124_1740773124/state\x00607'
2025-03-10 11:30:04,492 - gmqtt.client         - DEBUG   - [RECV sensor/tydom/lightPower_tydom_1740773124_1740773124/state with QoS: 0] b'\x00607'
2025-03-10 11:30:04,492 - gmqtt.mqtt.utils     - DEBUG   - FREE MID: None

Merci pour le travail fou ! Valentin

vchatela avatar Mar 10 '25 10:03 vchatela