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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user