fwmarcel / home-assistant-divera

This is a custom component that allows to address the Divera 24/7 alarm software from Home Assistant.
48 stars 11 forks source link

[Feature]: Add Alarm-Number to Alarm-Sensor in HA #141

Closed dabenzel closed 5 months ago

dabenzel commented 5 months ago

Requirements

Is your feature request related to a problem?

-

Describe the solution you'd like

When having placed an automation on the Alarm-Sensor in HomeAssistant and the Keyword changes/increases (FEU -> FEU 2 -> ...) the automation always fires because the alarm gets updated in Divera. When the trigger is something stable like the Divera Alarm-Number, you can avoid the automation always firing

Describe alternatives you've considered

No response

Additional context

No response

dabenzel commented 5 months ago

Hey, if it's okay for you, I'd like to implement this myself first (want to learn Python and custom HA-Integrations)

N1c093 commented 5 months ago

@dabenzel The alarm sensor already have an attribute id which is an unique alarm id. Or do you mean something else?

The blueprint still have to be updated. I already have this prepared and will create a pull request.

dabenzel commented 5 months ago

Has it? I have looked in the sensor-attributes during an alarm and have not found it. Where I haven't looked is in the dev-tools and there in the sensor attributes. Maybe I just missed it.

N1c093 commented 5 months ago

Yes, see screenshot: image

dabenzel commented 5 months ago

So it's this Divera-Field? image

Because that's what I need

fwmarcel commented 5 months ago

The ID and the Alarm number are in fact two different things.

The Alarm number itself is not yet available. This still needs to be added. If you explicitly need the content of the ID.

If you just want to avoid triggering the automation again, you can fall back on the ID.

fwmarcel commented 5 months ago

Of course you are welcome to implement this yourself. I also use the project to learn to develop Python and Home Assistant integration.

fwmarcel commented 5 months ago

The change is now available in the newsest release