Z Wave lock shows wrong status

I am having a heck of a time getting my kwikset 910 smart lock (zwave) to show the correct lock/unlock status. The wink app says the door is locked and it physically is, but HA says it isn’t. My template config is listed below. What am I missing. Also the entity id is lock.front_door it doesn’t say binary or sensor like most do. does this look correct? Is there a way to configure this through UI Customizations.

  - platform: template
    sensors:
    lock_invert:
    value_template: >-
          {{ is_state('lock.front_door', 'unlocked') }}
          friendly_name: front door
          device_class: lock

your format is all over the place. You gotta keep the indentations correct.

binary_sensor:
  - platform: template
    sensors:
      lock_invert:
        value_template: >-
          {{ is_state('lock.front_door', 'unlocked') }}
        friendly_name: front door
        device_class: lock

Of course, this binary_sensor will not work if this is true.

Does lock.front_door show the correct state?

Is this related? https://github.com/home-assistant/home-assistant/issues/30462

It does not I am trying the above config you wrote but still no joy going to try the binary sensor entry in front to see if that works.

Is that in response to this question:

Petro the door says unlocked in the STATES section of the UI but the Lovelace card still reads unlocked in HA.

It does show the correct state.

Can you take a screenshot of lock.front_door in the states page?
Can you take a screenshot of binary_sensor.lock_invert in the states page?
Can you post the entirety of your configuration.yaml? If not can you at least post what you have for the following config?

binary_sensor:
  - platform: template
    sensors:
      lock_invert:
        value_template: >-
          {{ is_state('lock.front_door', 'unlocked') }}
        friendly_name: front door
        device_class: lock

love lace

The back door is dead until my lithium batteries from Amazon get in.

So it looks like it’s correct in the UI. I don’t see the problem?

Do you understand what it’s showing you in the UI?

image

As for your configuration. You’re doing many things wrong. I can’t really tell if it’s causing problems because I can’t see the whole thing. But…

  1. You should have only 1 binary_sensor section.
  2. You should only have 1 template platform.
sensor:
- platform: template
  sensors:
    sensor1:...

    sensor2:...

    sensor3:...

You currently have

sensor:
- platform: template
  sensors:
    sensor1:...
- platform: template
  sensors:
    sensor2:...
- platform: template
  sensors:
    sensor3:...

aside from that your binary_sensor.lock_invert itself looks good but you didn’t take a screenshot of it in the states page.

:man_facepalming:I feel so dumb. Can’t believe I didn’t catch that. Sorry for having to expend resources into this.