Fibaro smoke sensor notification

Hi,

I present to you my smoke alarm blueprint. It is made for Fibaro smoke sensors in zwaveJS but could work for others. It also is based on my notification script. This script just needs these parameters: who, title, message and url for action.

(You can find my notifications script here: GitLab)

Hope it is useful to someone :slight_smile:

(You can find my french article about it here)

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Blueprint

blueprint:
  name: Fibaro Smoke alarm
  description: Sends a notification via the notification engine if there is an alarm
  domain: automation
  
  input:
    smoke_sensor:
      name: Fire sensor
      description: The smoke sensor that will be used to detect fire
      selector:
        entity:
          device_class: smoke

    smoke_sensor_tamper:
      name: Tamper sensor
      description: Select a tamper sensor to be alerted when the sensor is removed from it's place
      selector:
        entity:
          device_class: safety

    smoke_sensor_test:
      name: Capteur de test
      description: Select a test sensor to be alerted when the sensor is tested
      selector:
        entity:
          device_class: problem

    notif_engine_script:
      name: Notification engine script
      selector:
        entity:
          domain: script

    critical_notif_engine_script:
      name: Critical notification engine script
      selector:
        entity:
          domain: script
    
    script_if_fire: 
      name: Script to execute when an alarm is sent
      selector:
        entity:
          domain: script

    message_content:
      name: Notification message
      description: Message to send when there is fire
      default: "Un incendie est détecté: Vérifiez les informations et appelez le 144"

    message_content_tamper:
      name: Notification message
      description: Message to send when a sensor is removed
      default: "Un capteur incendie à été enlevé"

    message_content_test:
      name: Notification message
      description: Message to send when a sensor is tested
      default: "Le capteur incendie à été testé"

    message_content_default:
      name: Notification message
      description: Default message if something triggers but we don't know what for a reason
      default: "Il s'est passé quelques chose, vérifiez!"

    sensor_page_url:
      name: Lovelace sensor page
      description: Lovelace page to link to
      default: "/lovelace/main"
  
trigger:
- platform: state
  entity_id: !input smoke_sensor
  to: 'on'
- platform: state
  entity_id: !input smoke_sensor_tamper
  to: 'on'
- platform: state
  entity_id: !input smoke_sensor_test
  to: 'on'
condition: []
action:
  - choose:
    - conditions:
        - condition: state
          entity_id: !input smoke_sensor
          state: 'on'
      sequence:
        - service: !input script_if_fire
        - service: script.notification_engine_critical
          data:
            who: family_app
            title: Smoke alarm!
            message: !input message_content
            url: !input sensor_page_url
    - conditions:
        - condition: state
          entity_id: !input smoke_sensor_tamper
          state: 'on'
      sequence:
        - service: script.notification_engine
          data:
            who: family_app
            title: Smoke sensor removed!
            message: !input message_content_tamper
            url: !input sensor_page_url
    - conditions:
        - condition: state
          entity_id: !input smoke_sensor_test
          state: 'on'
      sequence:
        - service: script.notification_engine
          data:
            who: family_app
            title: Smoke sensor tested!
            message: !input message_content_test
            url: !input sensor_page_url
    default: 
      - service: !input script_if_fire
      - service: script.notification_engine_critical
        data:
          who: family_app
          title: Smoke alarm (undefined)!
          message: !input message_content_default
          url: !input sensor_page_url
4 Likes

Hi @irgusite
Nice Blueprint!

How do I expand this blueprint to include several sensors?
I have 5 smoke detectors in total and would like the notification to be send if ANY of the smoke sensors fire.

  • Thomas

Hi

I personally use 1 blueprint per sensor to have a notification with the sensor location/informations that I think useful for the sensor.

Nevertheless, I know you can use the device class to select multiple sensors to track, but as I have never used it, I don’t know how to modify it to suit that. If anyone has an idea I’m open to modify the blueprint to accommodate for that :slight_smile:

1 Like

Thanks for the automation blueprint.

Is it possible to create an automation without running scripts? Seems like you’d want either actions in the automation or a script, not both.

Thanks :slight_smile:

edit; my bad, should’ve read the first post properly :laughing:

New issue;

I can’t seem to get HA to accept the scripts in YAML. I just get Message malformed: extra keys not allowed @ data['notification_engine_critical']

Seems the same for notification engine too. I’ve tried formatting myself, and it passes in a YAML checker, but no joy in HA :frowning:

@rickydg show me your yaml, without it I cannot know what you did ^^ the blueprint should work as it is on my instance ^^.

Hello
Thanks for sharing the blueprint :slight_smile:
Few days ago after having forgotten the oven heating for 10 hours I decided it’s more than time to get smoke detectors !
I’ve bought the Fibaro 2 years ago sleeping in the attic so turned it on and added as Zwave node.
I’ve added your blueprint, but I try to create the automation from it, there is nothing shown in the dropdown next to Fire sensor nor Capteur de test.
Thing is that my Fibaro smoke detector node is most of the time “initializing”; got it ready and sleeping some times when i smoked a cigarette on it but even at that time, it didn’t show up in the automation dropdown.
I have the entities of the smoke detector in Home Assistant though.
Do you have any idea on what could be the cause or steps I’d have misunderstood?
Please apologies my english… French speaker from Belgium :wink:
Kind regards,
David

Now its in sleeping mode, node complete, i think it’s due to the default wake up interval.
But still, I don’t see the smoke detector in the dropdowns for setting creating the automation based on the blueprint.
Is there something specific to set the device class in order to have it listed there?

Forgot to mention that I still use the “old” Zwave integration; too afraid of migrating to JS Zwave

Oh it is not compatible with the old integration as it does not create the necessary sensors.

Hi Irgusite,

Thanks for your reply.
Indeed now i’ve migrated to Zwave JS and it works :slight_smile: :slight_smile:

Hey,

thanks for the cool blueprint ! I managed to import it, but I’m struggling on how to import your script ? I cant find a proper guide on how to include your notification script :frowning:
Would you mind explaining how to do that ?

Another question I have, although I have the fibaro smoke sensor (FGSD-002), it seems to lack the tamper protection ? Or am I missing a config there as well ?

Thanks in advance !
Tom

I fixed the tamper issue:
Search for this section in the blueprint and change the device_class to tamper:

smoke_sensor_tamper:
      name: Tamper sensor
      description: Select a tamper sensor to be alerted when the sensor is removed from it's place
      selector:
        entity:
          device_class: tamper