-
Notifications
You must be signed in to change notification settings - Fork 8
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
JSON Dump of Starkvind air purifier #6
Comments
I got it almost done, but would need some testing. Is the motorRunTime also a time attribute that is in "minutes" or is it something different? |
Added support, do test it and let me know. This is available in the latest release |
The motorRunTime is also in minutes. Its the total time the fan has worked basically. In the case of this Starkvind it would be around 518 days it's been running. I will test the new version and report! thank you |
it finds the air purifiers but the entities are not available. I believe you forgot the ".attributes", as in fan.py line 125 it should be Logger: homeassistant.components.fan
Source: helpers/entity_platform.py:352
Integration: Lüfter ([documentation](https://www.home-assistant.io/integrations/fan), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+fan%22))
First occurred: 18:18:34 (1 occurrences)
Last logged: 18:18:34
Error while setting up dirigera_platform platform for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 352, in _async_setup_platform
await asyncio.gather(*pending)
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 1047, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 995, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1600, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/dirigera_platform/fan.py", line 272, in is_on
return self._device.is_on
^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dirigera_platform/fan.py", line 178, in is_on
if self.available and self.motor_state > 0:
^^^^^^^^^^^^^^^^
File "/config/custom_components/dirigera_platform/fan.py", line 125, in motor_state
return self._json_data.motor_state
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AirPurifier' object has no attribute 'motor_state'. Did you mean: 'set_motor_state'? |
Thank you, you should have just submitted a pull request. I copied your code and pushed a new release. Not sure why when its clicked shows a switch. |
Hi, From the error log
Check out this STARKVIND from IKEA. |
Please enable debug for the integration
…On Sun, 24 Mar 2024 at 17:58, Beau ***@***.***> wrote:
Hi,
I can't manage to get the JSON dump (nothing appears in the logs after
calling the service???) but my air purifier isn't showing in HA.
From the error log
Error while setting up dirigera_platform platform for fan Traceback (most
recent call last): File
"/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line
350, in _async_setup_platform await asyncio.shield(awaitable) File
"/config/custom_components/dirigera_platform/fan.py", line 48, in
async_setup_entry hub_air_purifiers = await
hass.async_add_executor_job(hub.get_air_purifiers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File
"/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File
"/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 129, in
get_air_purifiers return [dict_to_air_purifier(air_p, self) for air_p in
airpurifiers] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File
"/usr/local/lib/python3.12/site-packages/dirigera/devices/air_purifier.py",
line 77, in dict_to_air_purifier return AirPurifier( ^^^^^^^^^^^^ File
"/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 341, in
__init__ raise validation_error pydantic.error_wrappers.ValidationError: 1
validation error for AirPurifier attributes -> fanMode value is not a valid
enumeration member; permitted: 'low', 'medium', 'high', 'auto'
(type=type_error.enum; enum_values=[<FanModeEnum.LOW: 'low'>,
<FanModeEnum.MEDIUM: 'medium'>, <FanModeEnum.HIGH: 'high'>,
<FanModeEnum.AUTO: 'auto'>])
-
Error adding entity None for domain sensor with platform dirigera_platform
Traceback (most recent call last): File
"/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line
576, in _async_add_entities await coro File
"/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line
725, in _async_add_entity device =
dev_reg.async_get(self.hass).async_get_or_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError:
homeassistant.helpers.device_registry.DeviceRegistry.async_get_or_create()
argument after ** must be a mapping, not SensorDeviceClass
Check out this STARKVIND from IKEA.
Here’s a little more information:
https://ingka.page.link/Mn5pCyvc17aTX8ML8
—
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2X3CRLCQ2C3OWZDB43PA3YZ3BIDAVCNFSM6AAAAABD4Q2OX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWG44TGNZYGQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Here's a dump of one of my Starkvind air purifiers that you asked for @sanjoyg:
I described the values that the canReceive attributes can handle in the air_purifier.py that I wrote for leggin/dirigera repository (https://github.com/Leggin/dirigera/blob/main/src/dirigera/devices/air_purifier.py)
EDIT:
The *time attributes are minutes, btw. I forgot to comment that in the device code.
Also the "fanModeSequence":"lowMediumHighAuto" thing.. it's receivable but I didn't find any values you can use with it, tbh. i believe it can be ignored in the integration since not even the IKEA Home Smart App is giving any options to set it to
The text was updated successfully, but these errors were encountered: