panasonic_smart_app icon indicating copy to clipboard operation
panasonic_smart_app copied to clipboard

實體沒有顯示在裝置底下

Open bluesaturnx94 opened this issue 2 years ago • 4 comments

[已解決]我的設備裡面找不到開關,也找不到像是 https://percy10442.pixnet.net/blog/post/560576446-panasonic%E5%86%B7%E6%B0%A3%E6%A8%A1%E7%B5%84%E6%95%B4%E5%90%88%E9%80%B2%E5%85%A5home-assistant 裡面介紹的基本冷氣功能,請問知道該如何解決嗎?

bluesaturnx94 avatar Sep 24 '22 15:09 bluesaturnx94

我自己也有這問題,但其實實體都會存在只是沒列在裝置底下而已,試著在實體列表裡找找看

前陣子有試著處理這個問題,但實在找不到問題在哪,現階段只能重裝試試了

osk2 avatar Sep 26 '22 02:09 osk2

同樣問題,冷氣開關出不來,但其他項目有出現,重裝了N遍

型號是吊隱式的CS-J90BDA2搭配CZ-T007

查看 log 訊息貌似為添加實體時發生錯誤

Logger: homeassistant.components.climate
Source: custom_components/panasonic_smart_app/climate.py:195
Integration: 溫控 ([documentation](https://www.home-assistant.io/integrations/climate), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+climate%22))
First occurred: 02:06:36 (2 occurrences)
Last logged: 02:06:36

Error adding entities for domain climate with platform panasonic_smart_app
Error while setting up panasonic_smart_app platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 691, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 777, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 573, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 341, in state_attributes
    data[ATTR_SWING_MODE] = self.swing_mode
  File "/config/custom_components/panasonic_smart_app/climate.py", line 195, in swing_mode
    _swing_mode = CLIMATE_AVAILABLE_SWING_MODE[_raw_swing_mode]
KeyError: 65535

我的 case 應該是吊隱式沒有風向功能導致 _swing_mode 判別出錯

我在 /config/custom_components/panasonic_smart_app/climate.py 的 195 行加入 try cache 處理後使其有預設值即可 然後再重啟 homeassistant 並再重新加入冷氣便成功

目前使用上沒問題,也可以添加至 homekit 操作

navishachiku avatar Oct 09 '22 18:10 navishachiku

感謝回報,swing mode 的問題之後會修正

osk2 avatar Oct 11 '22 02:10 osk2

@navishachiku 剛剛更新了 master,可以的話再幫我試試問題有沒有被修正了

osk2 avatar Nov 02 '22 13:11 osk2

已在 v2.5.0 更新

osk2 avatar Jan 30 '23 03:01 osk2