Hi everyone, I wanted to share my experience setting up a water leak alarm system using 433 MHz sensors. While the sensors themselves are straightforward, integrating them into my home automation setup has been an interesting journey.
Initially, I configured the sensor using MQTT with the following setup:
yaml
- platform: mqtt
name: “Waterleak Bathroom”
state_topic: ‘tele/rfbridge/RESULT’
value_template: >-
{% if value_json.RfReceived.Data == ‘12345’ %}
{{‘ON’}}
{% elif value_json == ‘12345off’ %}
{{‘OFF’}}
{% else %}
{{states(‘binary_sensor.waterleak_bathroom’) | upper}}
{% endif %}
device_class: moisture
Next, I created a dashboard card to display the status and allow for a quick reset:
yaml
columns: 3
entities:
- entity: sensor.badevaerelse_temperatur
- entity: sensor.badevaerelse_luftfugtighed
- entity: binary_sensor.badevaerelse_bevaegelse
- entity: light.bad_led
- entity: binary_sensor.waterleak_bathroom
tap_action:
action: call-service
service: mqtt.publish
service_data:
payload: ‘’‘12345off’‘’
topic: tele/rfbridge/RESULT
show_name: false
show_state: true
type: glance
The challenge was ensuring the payload was correctly formatted and that the MQTT topic was properly addressed. After some trial and error, I realized the payload needed to be enclosed in triple quotes to ensure it was sent correctly. This small detail made all the difference!
I’d love to hear if anyone else has implemented similar systems or has tips for improving this setup. It’s always great to learn from the community!
Best regards,
[Your Name]