feat: enhance JackeryHome sensor attributes for improved functionality

- Added `_attr_should_poll` attribute to indicate polling behavior.
- Introduced `_attr_has_entity_name` attribute to support entity naming conventions.
This commit is contained in:
不求圣剑
2025-11-18 16:20:13 +08:00
parent bcf7da5fb9
commit fbd766d035

View File

@@ -209,7 +209,8 @@ class JackeryHomeSensor(SensorEntity):
self._attr_available = False
self._data_task = None
self._device_sn = "" # 设备序列号(从 LWT 消息中获取)
self._attr_should_poll = False
self._attr_has_entity_name = True
# 获取 meter_sn对于功率传感器使用对应的 _power 键
meter_sn_key_map = {
"grid_import": "grid_import_power",