Git Product home page Git Product logo

ha-mila's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ha-mila's Issues

PM1 and Room AQI not showing up in HomeKit

Using the HASS HomeKit Bridge and enabling all the sensors, everything else shows up fine (the fans, temp, humidity, CO, CO2, VOC, PM2.5 and PM10) but the PM1 and (indoor) "Room" AQI doesn't show up in HomeKit? Why might this be?

If this is obvious... apologies in advance. I'm new to Home Assistant and have not yet dived in deep enough to figure this out on my own — and wondering if there is something up that the integration author might want to be aware of. Or is this expected behaviour?

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

I found this in my logfiles:

2023-01-16 09:17:00.469 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor_XXX_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; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Is this a known issue or related to my setup?

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

I found another of these in my logfiles but for a different sensor:

2023-01-16 09:17:00.306 WARNING (MainThread) [homeassistant.components.sensor] 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; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Is it related to my setup or a known issue?

Failed setup, will retry -- never connects

Entered my username and password and entity was not added. Here are the log entries:

2023-09-03 16:24:30.664 WARNING (MainThread) [homeassistant.config_entries] Config entry 'm******@***.com' for mila integration not ready yet: Error communicating with API: Transport reported query error; Retrying in background
2023-09-03 16:24:36.159 DEBUG (MainThread) [custom_components.mila.update_coordinator] Setting up coordinator
2023-09-03 16:24:36.159 DEBUG (MainThread) [custom_components.mila.update_coordinator] Getting first refresh
2023-09-03 16:24:36.385 DEBUG (MainThread) [custom_components.mila.update_coordinator] Finished fetching mila data in 0.225 seconds (success: False)

I also reinatalled the HACS module and set up the integration. No luck. Thank for any assistance.

CO2 not updating

I haven’t checked the other sensors but CO2 across my three Mila’s hasn’t budged from 411 since I installed the integration.

Anyone else experiencing this?

I’ve tried restarting the integration as well as uninstalling and reinstalling.

distance_sensor broken with 2023.11 HA release

The release notes show this deprecated module was removed: home-assistant/core#101199

Unexpected error fetching mila data: No module named 'homeassistant.util.distance'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mila/update_coordinator.py", line 105, in _async_update_data
    await self._build_devices(data)
  File "/config/custom_components/mila/update_coordinator.py", line 119, in _build_devices
    self.devices[id] = MilaAppliance(self, self._api, id)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mila/devices/appliance.py", line 33, in __init__
    super().__init__(coordinator, api, device_id)
  File "/config/custom_components/mila/devices/device.py", line 24, in __init__
    self._build_entities_list()
  File "/config/custom_components/mila/devices/device.py", line 92, in _build_entities_list
    from ..entities import MilaEntity
  File "/config/custom_components/mila/entities/__init__.py", line 3, in <module>
    from .location import *
  File "/config/custom_components/mila/entities/location/__init__.py", line 3, in <module>
    from .distance_sensor import MilaLocationDistanceSensor
  File "/config/custom_components/mila/entities/location/distance_sensor.py", line 9, in <module>
    from homeassistant.util.distance import convert as distance_convert
ModuleNotFoundError: No module named 'homeassistant.util.distance'

No longer appears in Integrations

This was working great until a month or so ago. The Integration for Mila no longer appears in the +Integrations, though it does still come up and install in the HACS.

Error - data not loading properly

Any idea what’s causing this please?

`This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/mila/devices/device.py:85
Integration: Mila Cares (documentation, issues)
First occurred: 20:58:58 (25 occurrences)
Last logged: 21:49:59

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=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']"'
`

Invalid Login

Hello - Thank you for this great integration with my Mila! I hope I can get it working.

When I add the Mila Integration and am prompted to log in I am getting "Invalid Login". I know I am using the correct credentials because I can log in to the Mila app successfully. Any thoughts?

I am getting this error under logs:
This error originated from a custom integration.
Logger: custom_components.mila.config_flow
Source: custom_components/mila/config_flow.py:73
Integration: Mila (documentation, issues)
First occurred: 3:50:22 PM (3 occurrences)
Last logged: 3:53:23 PM

Status: 500, Error Message: Error with get https://api.milacares.com/mms/appliances/meta
Status: 500, Error Message: Error with get https://id.milacares.com/auth/realms/prod/protocol/openid-connect/auth

Can't add the integration

Hi there, I can't add the integration in the devices screen, it is stuck forever on "Please wait, starting configuration wizard for mila". I'm on the latest HaOS, is that a known issue?
image

Not returning correct list of Mila devices

Hello!

I'm not sure if this is an issue with this integration or with my Mila account. I have 4 Mila devices, and this integration detects 4 devices, but 2 of them control the exact same Mila and none of them control my 4th unit.

Wondering if you might have any troubleshooting tips, or if this is something I will need to work with Mila to correct in my account in some way? Thanks!

Detected integration that accesses the `is_metric` property of the unit system. This is deprecated and will stop working in Home Assistant 2023.1

I found the warning below in my logfiles:

2023-01-16 09:17:00.587 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that accesses the `is_metric` property of the unit system. This is deprecated and will stop working in Home Assistant 2023.1. Please adjust to use instance check instead.. Please report issue to the custom integration author for mila using this method at custom_components/mila/entities/location/distance_sensor.py, line 44: return self.device.hass.config.units.is_metric

Home Assistant 2023.1.4

Thanks :) !

Type error in entities/appliance/fan.py

I'm getting a large number of errors appearing in the logs

Error doing job: Task exception was never retrieved

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 899, in _async_registry_updated
    await self.platform.async_add_entities([self])
  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 776, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 969, in state
    if (is_on := self.is_on) is None:
  File "/config/custom_components/mila/entities/appliance/fan.py", line 66, in is_on
    return self.speed is not None and self.speed > 0
  File "/config/custom_components/mila/entities/appliance/fan.py", line 57, in speed
    return sensor["latest"]["value"] if sensor else None
TypeError: 'NoneType' object is not subscriptable

The relevant code:

@property
def speed(self) -> float:
sensors: List = self.device.get_value("sensors")
sensor = next((i for i in sensors if i["kind"] == ApplianceSensorKind.FanSpeed), None)
return sensor["latest"]["value"] if sensor else None

Did Mila change the API again?

Yesterday I noticed this integration stopped updating the sensors, so I tried the phone app and noticed that I got logged out from it, I logged back in with no issues.

Since then, this integration hasn't worked, I tried reloading the integration yesterday and today and I get the following error:

`Log Details (WARNING)
Logger: homeassistant.config_entries
Source: config_entries.py:1088
First occurred: November 6, 2022 at 9:11:06 PM (2 occurrences)
Last logged: 8:43:28 AM

Config entry '*@.com' for mila integration not ready yet: Error communicating with API: Failed to get a valid response from Mila API service; Retrying in background`

Anyone else having the same issue?
I'm suspecting Mila made changes again on their end.

Config flow not available

Fresh install of the HACS integration and I am getting the following error when trying to add the integration:
image

I am currently running:
Home Assistant 2022.8.7

This does not seem to be generating any log errors around this problem.

Auth token expiring frequently

Every few days my Mila auth token expires and I need to follow the 'reconfigure' flow, supplying my password.

Instead of this, assuming refresh tokens are not supported, I would prefer to entrust my password to the plugin, and for it to reauthenticate automatically.

HA showing C instead of F

Hello,

Great work on this! I really was hoping Mila API would be out by now. But you solved this wounderfuly!

Just wondering if i missed something. Buy HA is showing Mila Temps in C vs the App shoing in F. My other Temp Sensors are reporting correctly in F. Is there a setting I missed or what?

Please wait while Mila is being set up

I installed to HA core in a docker container, via HACS. I can see ha-mila as an integration; however, when I try to install the integration it gets stuck with the following message with no progress after a few minutes. Any ideas why this might be happening?

image

Unable to login

First of all, I want to say thank you for your hard work on this integration. Mila was one of the biggest missing pieces for me in Home Assistant.

The integration was working flawlessly for me since you released it, until yesterday, when both of my Milas became unavailable. I reloaded the integration hoping it would fix the issue, but it didn't. Tonight, I updated to Home Assistant Core 2022.6, uninstalled the integration and reinstalled it, but am unable to login with the correct credentials.

Any insight? Thanks again.

Detected integration that uses deprecated `async_get_registry` to access device registry - Update HA 2022.6.0

Hello,

async_get_registry has been deprecated as of 2022.6.0

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:103
First occurred: June 3, 2022, 11:29:10 PM (1 occurrences)
Last logged: June 3, 2022, 11:29:10 PM

Detected integration that uses deprecated async_get_registry to access device registry, use async_get instead. Please report issue to the custom component author for mila using this method at custom_components/mila/init.py, line 81: device_registry = await hass.helpers.device_registry.async_get_registry()

api 502 bad gateway

2022-06-01 20:30:37 INFO (MainThread) [custom_components.mila.milacloud] get https://api.milacares.com/mms/appliances/meta
2022-06-01 20:30:39 INFO (MainThread) [custom_components.mila.milacloud] 502, message='Bad Gateway', url=URL('https://api.milacares.com/mms/appliances/meta')

distance_convert deprecated

Hi, just got my Mila yesterday, installed your integration and all working great! Thanks for your work!

I did notice an entry in the logs and thought I'd log it here...

Detected integration that uses distance utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2022.4, it should be updated to use unit_conversion.DistanceConverter instead. Please report issue to the custom integration author for mila using this method at custom_components/mila/entities/location/distance_sensor.py, line 34: val = distance_convert(val, LENGTH_KILOMETERS, LENGTH_MILES)

Issues after Update to OS 10.3

Hi,
I updated Home Assistant to the latest version: 2023.6.3 (OS 10.3). When I did this, the Mila Integration seemed to have broken. I have tried clearing out the integration and I pulled the latest version from the repo and it still gives this error.

Thank you for your help.
IMG_0014
IMG_0015

Configuration via UI unsupported

it seems after the recent update the configuration via UI is not working anymore.
I have tried removing mila from custom components, restarting ha, installing again, and restarting ha before adding again from integrations.

Always getting the same message:

This integration does not support configuration via the UI. If you followed this link from the Home Assistant website, make sure you run the latest version of Home Assistant.

Screen Shot 2022-07-21 at 9 08 23 PM

Error loading

Getting this error on my Mila stuff in Home assistant. Seemed to happen after updating to 8ed6332

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 353, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/mila/init.py", line 19, in async_setup_entry
coordinator = MilaUpdateCoordinator(hass, entry)
File "/config/custom_components/mila/update_coordinator.py", line 37, in init
self._api = MilaApi(MilaConfigEntryAuth(hass, config_entry, MilaOauthImplementation(hass, config_entry)))
File "/config/custom_components/mila/auth.py", line 43, in init
self._auth = milasdk.MilaOauth2(token=cast(dict, config_entry.data["token"]))
KeyError: 'token'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.