Comments (8)
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?
from dirigera_platform.
Added support, do test it and let me know. This is available in the latest release
from dirigera_platform.
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
from dirigera_platform.
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
return self._json_data.attributes.motor_state
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'?
from dirigera_platform.
I made a fork and fixed some stuff in fan.py (attributes, and icons). Everything seems to work just fine now! thank you for your work <3
we can either merge or you just copy paste the few edits from my fork.
the only thing I don't get is why every entity act's like a switch when clicked?
from dirigera_platform.
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.
from dirigera_platform.
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
from dirigera_platform.
from dirigera_platform.
Related Issues (20)
- Vallhorn motion sensor always reported as "clear" HOT 5
- Trigger scenes HOT 7
- Issues since 1.4.2 HOT 8
- 1.4.1 - set support -no lights included in the set HOT 13
- Vindstyrka Enviroment Sensor broken HOT 17
- Badring watersensor HOT 11
- Non-IKEA sensors support? HOT 4
- Parasoll slow response HOT 9
- TRADFRI motion sensor HOT 9
- Not full spectrum of color temp of smart bulbs HOT 7
- Show battery level in device list HOT 42
- Light status updates are very slow (e.g. when changing brightness) HOT 23
- Error installing HOT 1
- HA status not updated HOT 21
- Name of reposetory ? HOT 4
- issue with update of lights since last version 1.7.6 and 1.7.5 HOT 13
- Rodret Wireless Dimmer HOT 2
- Doorsensor event propagation no longer instant HOT 3
- Dirigera HUB connection lost after update / reboot of HomeAutomation HOT 3
- New devices: door sensor (PARASOLL) & Water Leak sensor (BADRING) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dirigera_platform.