瀏覽代碼

Fix API status sensors using wrong Room State device identifier

ZiB 5 月之前
父節點
當前提交
631444c5c2
共有 1 個文件被更改,包括 1 次插入 和 1 次删除
  1. 1 1
      custom_components/room_cal_ha/sensor.py

+ 1 - 1
custom_components/room_cal_ha/sensor.py

@@ -56,7 +56,7 @@ async def async_setup_entry(
 
   if entry.options.get(CONF_SYNC_MODE) == SYNC_MODE_API:
     room_state_device = DeviceInfo(
-      identifiers={(DOMAIN, entry.entry_id)},
+      identifiers={(DOMAIN, f"{entry.entry_id}_room_state")},
       name=f"{room_name} Room State",
     )
     entities += [