Skip to content

Comments

Update sensor.py#1

Open
O-Palda wants to merge 1 commit intomasterfrom
O-Palda-categories-patch
Open

Update sensor.py#1
O-Palda wants to merge 1 commit intomasterfrom
O-Palda-categories-patch

Conversation

@O-Palda
Copy link
Owner

@O-Palda O-Palda commented Oct 1, 2022

ome Assisstant has deprecated ENTITY_CATEGORY constant and replaced it with EntityCategory. enum in sensor.py >

from homeassistant.const import ( ENTITY_CATEGORY_CONFIG, ENTITY_CATEGORY_DIAGNOSTIC, )

I have replaced it with

from homeassistant.helpers.entity import EntityCategory

and then replacing ENTITY_CATEGORY classes with EntityCategory.CONFIG / EntityCategory.DIAGNOSTICT in entity_category= of each sensor and error messages in logs have stopped.

I dont know whether the errors appear before updating to 2022.9.2 of Hassio version with the latest clage_homeserver integration.

Thank you very much,

Ondrej

@O-Palda
Copy link
Owner Author

O-Palda commented Oct 10, 2022

I made a mistake, DIAGNOSTICT is spelled wrong, once I am on computer I will fix it and do another PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant