Skip to content
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

Sensors interface #1731

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

apocaliss92
Copy link
Contributor

@apocaliss92 apocaliss92 commented Feb 9, 2025

I skipped all the changes to versions of package.json, I did it only in the py file
not sure if I missed anything

Used this as reference 5d87a1b

@apocaliss92
Copy link
Contributor Author

apocaliss92 commented Feb 9, 2025

Probably the single sensor could contain some metadata, i.e. unit or any descriptor of the utility, instead of plain strings

Something like
sensors: Record<string, {name?: string, value?: any, data?: any}>;

@@ -218,6 +218,16 @@ export interface Buttons {
buttons?: ('doorbell' | string)[];
}

export interface Sensor {
Copy link
Owner

Choose a reason for hiding this comment

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

name is required? what names are you using?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For homeassistant, the id would be the entity_id, which could be pragmatic, friendly_name can give a bit of context. Most of the times entity IDs are autogenerated and not comprehensible

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