Samsung (samjin) Leak Sensor, automation notification w/Telegram

So I picked up a handful of Samsung GP-U999SJVLCAA leak sensors and paired them with Home Assistant. They detect water just fine, showing “Wet” in the UI. I created an automation to send a Telegram message when their condition changes from Dry to Wet, but it isn’t getting triggered. I configured the automation through the UI:

and here is the portion of automations.yaml that it created:

- id: '1564703477201'
  alias: Basement Bilco Door Water Detected
  - entity_id: binary_sensor.samjin_water_01077d72_1_1280
    from: 'Dry'
    platform: state
    to: 'Wet'
  condition: []
  - data:
      message: Basement Bilco Door Water Detected
      title: '*Home Assistant*'
    service: notify.notify_telegram

I tested the automation through the UI, and it sends the Telegram message. Other automations I have set up trigger just fine (for example, one that sends a Telegram message when the server stops or starts).

I added the automations while running 0.97.0b1, but downgraded back to 0.96.5 to try to determine if this was a beta issue and it was not. I backed up automations.yaml and recreated this single automation through the UI so that it was the only automation on the system, and it did not trigger. I monitored the logs while wetting the sensor and the automation did not report that it was triggering there either.

I’m left assuming at this point that the Telegram portion of the config is fine, but I’m at a loss as to why the automation isn’t firing while the server is clearly seeing the state change in the sensor.

Thanks in advance for your help!

Replace Dry and Wet with off and on.

A binary_sensor’s two states are on and off. However, they can be represented in the Lovelace UI using other words like Wet/Dry, Open/Closed, Connected/Disconnected, Detected/Clear, etc depending on their device_class. To refer to the binary_sensor’s states in an automation, use on/off.

1 Like

Ugh, I was gonna reply and say that’s how I started my automation from the beginning (and I still swear I did) but changing Dry/Wet to on/off now makes it work.