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

Synapse entity generation #4

Open
zoe-codez opened this issue Oct 31, 2024 · 1 comment
Open

Synapse entity generation #4

zoe-codez opened this issue Oct 31, 2024 · 1 comment
Milestone

Comments

@zoe-codez
Copy link
Member

zoe-codez commented Oct 31, 2024

🪤 Context

UI based entity registrations. Backend will assemble entities, and provide to automation code like this

entities.my_select.current_option = "foo"

📬 Caveats

The synapse entity generation tools won't be provided directly to the service for v1. There's some weirdness to sort out with continually redefining an entity, and potential memory leaks through the strange create / teardown process

🩻 Additional details

https://github.com/Digital-Alchemy-TS/code-glue/blob/main/apps/server/src/utils/contracts/entities.ts

@zoe-codez zoe-codez added the enhancement New feature or request label Oct 31, 2024
@zoe-codez zoe-codez changed the title Synapse entity generation (1.0) Synapse entity generation Oct 31, 2024
@zoe-codez zoe-codez added this to the 1.0 milestone Oct 31, 2024
@zoe-codez
Copy link
Member Author

Attributes

These get reported to home assistant as part of entity.attributes.

  • defaultAttributes (JSON object)
  • attributes (type definition)

Locals

Used for storing properties against the entity without emitting update events or sending that info to home assistant. Info DOES get persisted to sqlite automatically

  • locals (type definition)
  • defaultLocals (json object)

Configuration

Domain specific configurations. Used as the default value for new entities

Will need to reference synapse library internals for types. LMK and I can point them out for import

  • defaultConfig (json object)

Standard entity stuff

  • icon
  • name
  • suggested_object_id
  • type
  • icon (can be changed at runtime also)

Other

  • documentation
  • labels (does not auto sync to generated entity)

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

No branches or pull requests

1 participant