Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Script can't add contact sensors #2

Open
catduckgnaf opened this issue Oct 9, 2023 · 0 comments
Open

Script can't add contact sensors #2

catduckgnaf opened this issue Oct 9, 2023 · 0 comments

Comments

@catduckgnaf
Copy link
Owner

The problem is that, since we can't read the content of the message, the mqtt sensor uses a counter. So then when the sensor sends its heartbeat message, it throws it off and the only way to fix it is to switch the 0 and 1 between the payload values.

Below is manual setup example

  • name: "front door"
    unique_id: "front_door_mqtt"
    state_topic: "rtl_433/SimpliSafe-Gen3/********"
    device_class: "door"
    value_template: >
    {{ (value_json.ctr % 2) }}
    payload_off: "1"
    payload_on: "0"
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant