这是indexloc提供的服务,不要输入任何密码
Skip to content

Update sensor.py #668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

LeiChat
Copy link
Contributor

@LeiChat LeiChat commented Jul 5, 2025

Added icon and state class to the two eddi temperature sensors.

The main aim is to enable the two sensors to be available as long term statistics in Home Assistant.
Adding the icon was just coincidental, rather than specifying NONE for the icon property of the create_meta function.

Relates to issue #353.

Added icon and state class to the two eddi temperature sensors.
Copy link
Collaborator

@G6EJD G6EJD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a conflict on lines 482 and 499, in both cases a missing ',' after MEASUREMENT
Please correct.

@G6EJD G6EJD merged commit 90a7e54 into CJNE:main Jul 5, 2025
@LeiChat
Copy link
Contributor Author

LeiChat commented Jul 5, 2025

There's a conflict on lines 482 and 499, in both cases a missing ',' after MEASUREMENT Please correct.

Scrolling through the class, there seems to be a mix in the functions, some with and some without a comma on the last element.
Perhaps it's similar to C# where a comma after the last element is not required but ignored by the compiler if included.

An example of one without:
image

@G6EJD
Copy link
Collaborator

G6EJD commented Jul 5, 2025

Yes Python has its own syntactical idiosyncrasies, but it depends how the function parameters are structured.

All done now.

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.

2 participants