Skip to content
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

How to fix inverted status for sensors? #442

Open
taimurt opened this issue Mar 8, 2024 · 3 comments
Open

How to fix inverted status for sensors? #442

taimurt opened this issue Mar 8, 2024 · 3 comments
Labels
question Further information is requested

Comments

@taimurt
Copy link

taimurt commented Mar 8, 2024

Alarm system

SP6000 connected via ESP32 to homeassistant

Environment

Linux, Homeassitant OS

Question

How to fix the inverted status for sensors?

I probably can create my own sensor on top of these MQTT sensor states to make it right, but just wanted to confirm if there is a better way to do this by fixing in the PAI config or in MQTT settings.

Motion Sensor:
No motion states on MQTT "Detected"
Detected motion "Cleared"

Door Sensor:
Door Closed "Open"
Door Open "Closed"

Logs (if required)

SP6000 Zone OFFICE Open detected motion
13:58:28 - 4 minutes ago
SP6000 Zone OFFICE Open cleared (no motion detected)
13:58:28 - 4 minutes ago
SP6000 System Date Time changed to 2024-03-08 13:58:00
13:58:26 - 4 minutes ago
SP6000 Zone OFFICE Open detected motion
13:58:22 - 4 minutes ago
SP6000 Zone OFFICE Open cleared (no motion detected)
13:58:22 - 4 minutes ago
SP6000 Zone DOOR Open was opened
13:58:13 - 4 minutes ago
SP6000 Zone DOOR Open was closed
13:58:12 - 4 minutes ago
SP6000 Zone LIVING ROOM Open detected motion
13:57:33 - 4 minutes ago
SP6000 Zone LIVING ROOM Open cleared (no motion detected)
13:57:33 - 4 minutes ago
SP6000 Zone DOOR Tamper cleared tampering
13:57:26 - 5 minutes ago
SP6000 System Date Time changed to 2024-03-08 13:57:00
13:57:26 - 5 minutes ago
SP6000 Zone HALLWAY Open detected motion
13:57:24 - 5 minutes ago
SP6000 Zone HALLWAY Open cleared (no motion detected)
13:57:24 - 5 minutes ago

Screenshot 2024-03-08 at 14 03 47

@taimurt taimurt added the question Further information is requested label Mar 8, 2024
@yozik04
Copy link
Collaborator

yozik04 commented Mar 28, 2024

Are you sure your door contacts are correctly wired?

@taimurt
Copy link
Author

taimurt commented Mar 28, 2024

Yes, the door contact and motion sensors are working fine with the alarm panel. The wiring was done by professional installers. I was just wondering maybe I need to change some config in homeassistant to fix this or it was a known issue?

I have already created custom binary sensors to fix this with the following:

  • platform: template
    sensors:
    living_room_motion_p:
    friendly_name: "Living Room Motion P"
    unique_id: living_room_motion_p
    device_class: motion
    value_template: "{{ 'off' if is_state('binary_sensor.sp6000_zone_living_room_open', 'on') else 'on' }}"

  • platform: template
    sensors:
    main_door_sensor_p:
    friendly_name: "Main Door Sensor P"
    unique_id: main_door_sensor_p
    device_class: door
    value_template: "{{ 'off' if is_state('binary_sensor.sp6000_zone_door_open', 'on') else 'on' }}"

@yozik04
Copy link
Collaborator

yozik04 commented Mar 29, 2024

Interesting if only you have these inverted. I have not received any complaints before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants