vermut / ha_amc_alarm

AMC Alarm integration for HomeAssistant
MIT License
7 stars 1 forks source link

Entities suggestion #3

Open pboschi opened 6 months ago

pboschi commented 6 months ago

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 commented 6 months ago

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

Group/Area:

Zone:

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 commented 3 months ago

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.:

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 commented 3 months ago

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") }}'
vermut commented 2 weeks ago

I understand you mostly need a definite "motion sensor" instead of unclear "alarm panels". I can offer to add them as additional disabled entries, mimicking your templates.

Eskander commented 2 weeks ago

I think the current entities in Sensors are more suited to Diagnostic section, which would clear Sensors for any additional/alternative 'binary sensor' entities that show zone states.

image