Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

整合中的實體沒有作用 #101

Closed
NelsPu opened this issue Feb 14, 2024 · 4 comments
Closed

整合中的實體沒有作用 #101

NelsPu opened this issue Feb 14, 2024 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@NelsPu
Copy link

NelsPu commented Feb 14, 2024

新年快樂
這幾天的除濕機F-Y20JH,在整合之中都會顯示不可用。
以下是截圖及Log顯示內容
Snipaste_2024-02-14_10-47-10

2024-02-14 10:38:24.673 WARNING (MainThread) [homeassistant.components.humidifier.const] DEVICE_CLASS_DEHUMIDIFIER was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use HumidifierDeviceClass.DEHUMIDIFIER instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.675 WARNING (MainThread) [homeassistant.components.humidifier.const] SUPPORT_MODES was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use HumidifierEntityFeature.MODES instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.680 WARNING (MainThread) [homeassistant.const] DEVICE_CLASS_HUMIDITY was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.HUMIDITY instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.682 WARNING (MainThread) [homeassistant.const] DEVICE_CLASS_TEMPERATURE was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.TEMPERATURE instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.684 WARNING (MainThread) [homeassistant.const] DEVICE_CLASS_ENERGY was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.ENERGY instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.686 WARNING (MainThread) [homeassistant.const] DEVICE_CLASS_PM25 was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.PM25 instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.687 WARNING (MainThread) [homeassistant.const] TEMP_CELSIUS was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.689 WARNING (MainThread) [homeassistant.const] ENERGY_KILO_WATT_HOUR was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfEnergy.KILO_WATT_HOUR instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.691 WARNING (MainThread) [homeassistant.const] TIME_MINUTES was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTime.MINUTES instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.699 WARNING (MainThread) [homeassistant.const] TEMP_CELSIUS was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.701 WARNING (MainThread) [homeassistant.components.climate.const] HVAC_MODE_OFF was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.OFF instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.703 WARNING (MainThread) [homeassistant.components.climate.const] SUPPORT_TARGET_TEMPERATURE was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.705 WARNING (MainThread) [homeassistant.components.climate.const] SUPPORT_FAN_MODE was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.FAN_MODE instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.707 WARNING (MainThread) [homeassistant.components.climate.const] SUPPORT_SWING_MODE was used from panasonic_smart_app, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.SWING_MODE instead, please create a bug report at https://github.com/osk2/panasonic_smart_app/issues
2024-02-14 10:38:24.717 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform panasonic_smart_app
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 533, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 782, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1325, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 989, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1110, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1049, in __async_calculate_state
attr.update(self.state_attributes or {})
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 453, in state_attributes
raise ValueError(
ValueError: Entity sensor.chu_shi_ji_ben_yue_hao_dian_liang (<class 'custom_components.panasonic_smart_app.sensor.PanasonicEnergySensor'>) with state_class total_increasing has set last_reset. Setting last_reset for entities with state_class other than 'total' is not supported. Please update your configuration if state_class is manually configured.

@TwKenYang
Copy link

TwKenYang commented Feb 15, 2024

我成功解決了完全讀不到的問題
由於新版本的 Home Assistant 中不再需要last_reset的屬性
所以直接使用File editor
找到路徑/homeassistant/custom_components/panasonic_smart_app/sensor.py
其中291~293行註釋掉即可正常使用
image
以下是存檔後重啟
OKAPP
再期待開發者更新了^^

另外補充一個
即將棄用的 supported features 警告
警告訊息說,套件中的除濕機使用即將在 Home Assistant Core 2025.1 中被移除的 supported features 值。Home Assistant 開發者建議改用 HumidifierEntityFeature.MODES。

@osk2 osk2 self-assigned this Feb 16, 2024
@osk2 osk2 added the bug Something isn't working label Feb 16, 2024
@NelsPu
Copy link
Author

NelsPu commented Feb 16, 2024

我成功解決了完全讀不到的問題

由於新版本的 Home Assistant 中不再需要last_reset的屬性
所以直接使用File editor
找到路徑/homeassistant/custom_components/panasonic_smart_app/sensor.py
其中291~293行註釋掉即可正常使用
image
以下是存檔後重啟
OKAPP
再期待開發者更新了^^
另外補充一個 即將棄用的 supported features 警告 警告訊息說,套件中的除濕機使用即將在 Home Assistant Core 2025.1 中被移除的 supported features 值。Home Assistant 開發者建議改用 HumidifierEntityFeature.MODES。

非常感謝,照步驟操作已經解決問題
習慣自動化後,這幾天手動操作真的感覺超麻煩,感謝

同樣感謝開發者,期待更新

@osk2 osk2 added this to the v2.8 milestone Feb 16, 2024
@RoadosW
Copy link

RoadosW commented Feb 17, 2024

我的不在291~293
利用搜尋字串 def last_reset(self) 是在271~273

image

@osk2
Copy link
Owner

osk2 commented Feb 18, 2024

下一版會修正這個問題,手動移除 last_reset 可以暫時解決這個問題

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants