Closed smarrk closed 11 months ago
Working for me now also, thanks for fixing this!
Updated to core 2023.5.3 and it does not work at all now, error in configuration.yaml: Component error: iaquk - Exception importing custom_components.iaquk
Updated to core 2023.5.3 and it does not work at all now, error in configuration.yaml: Component error: iaquk - Exception importing custom_components.iaquk
@billmaterial Are you talking about this PR or the unchanged, "original" Code?
@smarrk I am talking about this PR, seems update to 2020.5.3 has stopped it from working with both the level and index not working now. I have reverted back to the original code for testing and there is no error in configuration.yaml but the air quality level again shows unknown. Going back to this PR same issue with config check: "error in configuration.yaml: Component error: iaquk - Exception importing custom_components.iaquk"
Logs show: Home Assistant Core Unexpected exception importing component custom_components.iaquk 12:26:31 – (ERROR) Indoor Air Quality UK Index (custom integration) - message first occurred at 12:26:17 and shows up 2 times Setup failed for custom integration iaquk: Unable to import component: Exception importing custom_components.iaquk 12:26:17 – (ERROR) setup.py
Hope this helps to fix the issue.
@billmaterial This is strange: I'm also on HA 2020.5.3 and i'm unable to reproduce this. Can you provide me with your configuration section for the integration?
@smarrk Yes it is a very strange issue, I have not changed my configuration and had no issues until 2023.5.0 then I changed sensor.py according to this PR and it worked fine with 5.1 and 5.2, then stopped with 5.3??? I have my configuration.yaml reference iaquk.yaml by the way to avoid any confusion.
my configuration.yaml file:
iaquk: !include iaquk.yaml
my iaquk.yaml file:
office: name: "Office" sources: temperature: sensor.temperature_scd41 humidity: sensor.humidity_scd41 co2: sensor.co2_scd41
livingroom: name: "Living Room" sources: temperature: sensor.house_temperature humidity: sensor.house_humidity
@billmaterial I'm afraid i'm still unable to reproduce this.
Have you tried adding my forked repo as Custom repository in HACS instead of changing sensor.py
manually?
(You can remove the original integration and then add my forked one; restart afterwards)
@smarrk Fantastic it works!!! Thank you so much for your help on this, you are a star :)
It works, thanks @smarrk
@Limych Could you review this merge request?
Thanks :heart:
Proposed change
Since v2023.5 the IAQ-Level entities fail with
This PR fixes the conflicts in the attribute definitions by only setting the
state_class
attribute for the IAQ-Index entities.Type of change
Additional information
Checklist
black --fast custom_components
)