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

Entities suggestion #3

Open
pboschi opened this issue May 16, 2024 · 3 comments
Open

Entities suggestion #3

pboschi opened this issue May 16, 2024 · 3 comments

Comments

@pboschi
Copy link

pboschi commented May 16, 2024

Hi, thanks for the great work - tested on x824.

May I suggest to re-organize some of the entities? Almost everything now is an alarm control panel with one state.

For example, for the four G1-G2-G3-G4 alarm activations possible (the Groups), there are four alarm control panels, named with the Gx labels, each with "away" and "disabled" states. In fact it should be one alarm control panel, with five possible activations states, named as in the labels plus a disabled state. Groups are mutually exclusive so this doesn't apply to Areas, which could be kept as separate alarm control panels.

@vermut
Copy link
Owner

vermut commented May 21, 2024

It's a tough one. There a multiple events/states that AMC is providing:

Group/Area:

  • armed
    • active
    • triggered (anomaly, alert) - like door open, or movement detected
  • disarmed
    • ready
    • not ready - like door open, or movement detected

Zone:

  • enabled
    • ready
    • triggered - like door open, or movement detected
  • disabled

I already struggled to map those to HA entities - you will see zones as Pending when they are not armed which is technically wrong.

If I replace groups with, say, multistate selector users will loose the ability to see if group is ready or not. Or some other subtleties.

I can make that selector as additional template entity, and demote groups to diagnostic level.

@pboschi
Copy link
Author

pboschi commented Aug 23, 2024

Hi, sorry if I'm back to the topic after some months. I now understand the issue for the groups/areas, so it's ok to keep it as it is.

Just a suggestion for Zones: maybe they should be managed using "HA logic" instead of "AMC logic"; e.g.:

  • each Zone should be
  • one switch (off => disabled, on => enabled)
  • one binary sensor (off => enabled ready, on => enabled triggered, unavailable => disabled if it is not exposed when disabled) (...or two binary sensors if you can discern anomaly from alert, in such case the second binary sensor should be of class "tamper" - or just use an enum sensor)

I know this would add a lot of entities, but it would uniform the logic management within HA of sensors from AMC and from other devices (E.g. zigbee).

@pboschi
Copy link
Author

pboschi commented Aug 23, 2024

For the zones now I'm using templates... to have this:
image

instead of this (rather confusing!):
image

each template is like this:

- binary_sensor:
  - name: "AMC - Sensore Movimento Soggiorno"
    unique_id: "AMC - Sensore Movimento Soggiorno"
    device_class: motion
    state: '{{ is_state("alarm_control_panel.x824_soggiorno", "triggered") }}'

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

No branches or pull requests

2 participants