-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Enhancement
NSpanel notification via HA notify platform
#2188
Comments
Currently facing the same issue. Also Kaibob2 I've never heard of Pushover before, I would be interested in seeing the way you use it (since we both want the exact same thing I'd basically only need to change the panel name) |
I'm currently in the process of completely rebuilding my complete home automation due to moving from an appartment to a house which is, sadly, currently a construction site :) I solved the "open sensors when arming issue" quick and dirty with the following in node red:
Maybe when I will ever have some spare time again I'll try to have the sensors listed on the panel by their names. For the moment I'm fine with the information that there IS any open window or door. |
My problem truly is the open sensor name. Simply showing a warning on the nspanel was easy.
Or you can simply call the service by editing the action yaml in Alarmo action tab :
The second one being really easy, but fails to pass on the wildcards. |
Unfortunately ESPHome does not supports notify service, so the only way is using esphome services. 😩
Could you please detail it better? |
returns the error And "tricking" it by using |
What about this? - service: esphome.nspanel1_notification_show
data:
label: Warning
message: '{{open_sensors|lang=fr}}' |
First thing I tried, plain text as well. |
And what about this? - service: esphome.nspanel1_notification_show
data:
label: Warning
message: '{{ open_sensors }}' What is the content of |
I've just tried this and it worked just fine: action: esphome.office_workstation_panel_notification_show
data:
label: Test 01
message: >
Battery status unavailable: {{
states.sensor
| selectattr('attributes.device_class', 'defined')
| selectattr('attributes.device_class', 'eq', 'battery')
| rejectattr('state', 'is_number')
| map(attribute="attributes.friendly_name")
| list
| join("/r")
}} |
|
But is it a list of entity_id's, or a string, or what? |
Looks like a list to me.
|
Oh my bad. I can also use the wildcards using dev tools, the problem I'm facing is strictly from Alarmo. |
Aren't we talking about the attribute "open_sensors" from alarmo which gets populated when the alarm is armed. Meaning it switches from "null" to, for Example, what I posted above. |
It is a dictionary. Your panel's action requires a string, so you have to transform it. Please try this: - service: esphome.nspanel1_notification_show
data:
label: Warning
message: '{{ open_sensors.keys() | list | join("\r") }}' Or this: - service: esphome.nspanel1_notification_show
data:
label: Warning
message: '{{ state_attr("alarm_control_panel.alarmzentrale", "open_sensors").keys() | list | join("\r") }}' |
That's really close, thanks. |
Please try this: - service: esphome.nspanel1_notification_show
data:
label: Warning
message: 'The following sensors are open:\r{{ states.binary_sensor | selectattr("entity_id", "in", state_attr("alarm_control_panel.alarmzentrale", "open_sensors").keys() | list) | map(attribute="attributes.friendly_name") | list | join("\r") }}' |
Nice!! By the way, |
Sorry to reopen this, but when I insert this code in the Alarmo actions as "failed to arm" action
The label is displayed on the panel but the message stays empty. This is the ESPHOME log:
|
First : thanks edwardtfn, it works !
The only "problem" is that \r worked as a template but not once sent to the panel, dunno why. So a comma is fine. |
I will take a look when back home... It should work with the |
What if you go to Developer Tools, tab Actions, and then try the |
The trick is another backslash in front of
Then the newline gets parsed by esphome. |
I tried |
Nice!! |
Enhancement Summary
If NSpanel would provide a notify.nspanel_xxx service, sending notifications would be easier.
Detailed Description
I'm still struggling getting alarmo to work properly on the NSpanel. The problem is the "weird" behaviour of the alarm page when there are sensors open which require to be closed to arm the alarm. In the HA dashboard an according message pops up indicating which sensor(s) "blocks" arming the alarm (when using the alarmo card). This is also discussed here #1088
I see, that a complete redesign of the alarm page would be a struggle, so I thought of another approach.
Alarmo supports sending notifications for each and every event natively.
https://github.com/nielsfaber/alarmo?tab=readme-ov-file#wildcards
I currently use this with the pushover integration, with great success.
Wouldn't it be possible to have a command available like notify.nspanel_livingroom which expects the default data for notifications?
I suppose in this project https://github.com/lubeda/EHMTX_custom_component/tree/main something very similar was done.
If you could simply call a notify service via alarmo to the nspanel as target when there is an open sensor a notifiaction would show up on the panel displaying which senor(s) are open.
Additional Context
No response
The text was updated successfully, but these errors were encountered: