Comments (3)
This happens, if no outdoor AQI is available. To fix it go in the Mila Cares App to Settings -> Your Hood -> Outdoor AQi -> Change and select a station with AQI by swiping left and right. If this doesn't fix the issue try adding the location again in the settings and add the mila to the new location.
Even if the outdoor AQI value is not interesting for a user, this is actually a big bug, because it makes the whole fan entity not work and some kind of exception handling is missing in the code.
from ha-mila.
Also getting this..
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/mila/devices/device.py:85
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 21:44:21 (5 occurrences)
Last logged: 21:47:58
[140376831107728] 'Invalid keys: "['outdoorStation', 'sensor', 'latest', 'value']"'
[140378013365776] 'Invalid keys: "['outdoorStation', 'sensor', 'latest', 'value']"'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
await result
File "/config/custom_components/mila/entities/appliance/fan.py", line 113, in async_turn_on
await self.async_set_preset_mode(PRESET_MODE_AUTOMAGIC)
File "/config/custom_components/mila/entities/appliance/fan.py", line 135, in async_set_preset_mode
await self.device.set_fan_mode(preset_mode)
File "/config/custom_components/mila/devices/appliance.py", line 69, in set_fan_mode
await self._coordinator.async_request_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 158, in async_request_refresh
await self._debounced_refresh.async_call()
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 82, in async_call
await task
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in async_refresh
await self._async_refresh(log_failures=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update
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 571, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 539, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 388, in state
value = self.native_value
File "/config/custom_components/mila/entities/location/aqi_sensor.py", line 21, in native_value
pm25: float = self.device.get_value("outdoorStation.sensor.latest.value")
File "/config/custom_components/mila/devices/device.py", line 85, in get_value
return self._device_data[data_path]
File "/usr/local/lib/python3.10/site-packages/benedict/dicts/init.py", line 54, in getitem
super(benedict, self).getitem(key))
File "/usr/local/lib/python3.10/site-packages/benedict/dicts/keypath/keypath_dict.py", line 36, in getitem
return super(KeypathDict, self).getitem(
File "/usr/local/lib/python3.10/site-packages/benedict/dicts/keylist/keylist_dict.py", line 42, in getitem
return self._getitem_by_keys(key)
File "/usr/local/lib/python3.10/site-packages/benedict/dicts/keylist/keylist_dict.py", line 49, in _getitem_by_keys
raise KeyError('Invalid keys: "{}"'.format(keys))
KeyError: 'Invalid keys: "['outdoorStation', 'sensor', 'latest', 'value']"'
from ha-mila.
Logger: homeassistant.components.sensor
Source: custom_components/mila/devices/device.py:85
Integration: Sensor (documentation, issues)
First occurred: 20:56:58 (2 occurrences)
Last logged: 20:56:58
Error adding entities for domain sensor with platform mila
Error while setting up mila platform for sensor
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 673, 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 571, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 539, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 388, in state
value = self.native_value
File "/config/custom_components/mila/entities/location/aqi_sensor.py", line 21, in native_value
pm25: float = self.device.get_value("outdoorStation.sensor.latest.value")
File "/config/custom_components/mila/devices/device.py", line 85, in get_value
return self._device_data[data_path]
File "/usr/local/lib/python3.10/site-packages/benedict/dicts/init.py", line 54, in getitem
super(benedict, self).getitem(key))
File "/usr/local/lib/python3.10/site-packages/benedict/dicts/keypath/keypath_dict.py", line 36, in getitem
return super(KeypathDict, self).getitem(
File "/usr/local/lib/python3.10/site-packages/benedict/dicts/keylist/keylist_dict.py", line 42, in getitem
return self._getitem_by_keys(key)
File "/usr/local/lib/python3.10/site-packages/benedict/dicts/keylist/keylist_dict.py", line 49, in _getitem_by_keys
raise KeyError('Invalid keys: "{}"'.format(keys))
KeyError: 'Invalid keys: "['outdoorStation', 'sensor', 'latest', 'value']"'
from ha-mila.
Related Issues (20)
- Invalid Login HOT 1
- No longer appears in Integrations HOT 1
- Configuration via UI unsupported HOT 3
- Error loading HOT 3
- Please wait while Mila is being set up HOT 1
- Config flow not available HOT 2
- distance_convert deprecated HOT 1
- Statistics card for outdoor AQI
- Did Mila change the API again? HOT 4
- CO2 not updating HOT 3
- Type error in entities/appliance/fan.py
- Detected integration that accesses the `is_metric` property of the unit system. This is deprecated and will stop working in Home Assistant 2023.1 HOT 1
- Entity sensor.XXXXX_aqi (<class 'custom_components.mila.entities.location.aqi_sensor.MilaLocationAqiSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('aqi') it is using
- Entity sensor.living_room_voc (<class 'custom_components.mila.entities.appliance.measurement_sensor.MilaApplianceMeasurementSensor'>) is using native unit of measurement 'ppb' which is not a valid unit for the device class ('volatile_organic_compounds') it is using HOT 1
- Issues after Update to OS 10.3 HOT 5
- PM1 and Room AQI not showing up in HomeKit HOT 2
- Failed setup, will retry -- never connects HOT 13
- distance_sensor broken with 2023.11 HA release HOT 3
- Can't add the integration HOT 1
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 ha-mila.