Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Entity no longer provided, after update. #39

Open
benjaminarthurt opened this issue Aug 6, 2023 · 5 comments
Open

Entity no longer provided, after update. #39

benjaminarthurt opened this issue Aug 6, 2023 · 5 comments

Comments

@benjaminarthurt
Copy link

Getting error connecting to FHPW122AC1
"Frigidaire 3-in-1 Connected Portable Room Air Conditioner 12,000 BTU". Had worked in HA previously, now no longer does. Control still works directly through Frigidaire app. Unfortunately I didn't notice when it went offline, but may be related to beta update, have done two additional updates since, currently at 2023.8.1. integration installed via HACS, using most recent version.

"This entity is no longer being provided by the frigidaire integration. If the entity is no longer in use, delete it in settings."

Home Assistant 2023.8.1
Supervisor 2023.08.1
Operating System 10.4
Frontend 20230802.0 - latest

Logger: homeassistant.components.climate
Source: custom_components/frigidaire/climate.py:191
Integration: Climate (documentation, issues)
First occurred: August 5, 2023 at 3:44:46 PM (6 occurrences)
Last logged: 6:26:44 AM

Error adding entities for domain climate with platform frigidaire
Error while setting up frigidaire platform for climate
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 750, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1004, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 746, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 808, in _async_write_ha_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 752, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 242, in state
hvac_mode = self.hvac_mode
^^^^^^^^^^^^^^
File "/config/custom_components/frigidaire/climate.py", line 191, in hvac_mode
return FRIGIDAIRE_TO_HA_MODE[frigidaire_mode]
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 6

@kzaoaai
Copy link

kzaoaai commented Jun 13, 2024

bump

@indomitableMan
Copy link

This issue also appears to happen with Frigidaire portable air conditioner model FHPW142AC1

@rothn
Copy link
Contributor

rothn commented Aug 31, 2024

Note: Per https://docs.python.org/3/library/enum.html, Python enums are 1-based. The 6th entry in Mode is AUTO: https://github.com/bm1549/frigidaire/blob/main/frigidaire/__init__.py

@rothn
Copy link
Contributor

rothn commented Aug 31, 2024

I responded to this earlier on #61, but will dupe that over to this.

The issue here is that FRIGIDAIRE_TO_HA_MODE does not contain an entry for AUTO, and we abuse HomeAssistant's AUTO setting to represent ECO mode

The fix would involve adding frigidaire.Mode.AUTO to FRIGIDAIRE_TO_HA_MODE and mapping that to HVAC_MODE_AUTO (currently used by frigidaire.Mode.ECO). But then what do we use to represent ECO mode? Any HomeAssistant experts that can weigh in here?

@bm1549 What do you think?

The quick fix would be to only modify FRIGIDAIRE_TO_HA_MODE and just have a non-bijective mapping to preserve the current behavior.

@bm1549
Copy link
Owner

bm1549 commented Sep 1, 2024

@rothn good find here - I think the "correct" way to do this in HomeAssistant is to use a preset. I had tried using it before, but couldn't get it to work with HomeKit and ended up using AUTO instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants