Fibaro Door Sensor V2

That is why I use “<” instead of “!=” Otherwise the sensor thinks that with a value other than 23 the door is open. So if the sensor value is 254, think it is open too.

I don’t understand why you guys are just using an equal sign for ‘22’… then you don’t need this less than stuff… What @Tinkerer posted in his response would have worked for the both of you with a minor change if you are dealing with a binary_sensor template:

- platform: template
  sensors: 
    door:
      sensor_class: opening
      friendly_name: 'Door'
      value_template: "{{ is_state('sensor.DOOR_access_control', '22') }}"

Also, @northhacks, you aren’t including the domain in your template which is going to cause that to fail.

needs a domain and it would look something like this:

- platform: template
  sensors: 
    door:
      sensor_class: opening
      friendly_name: 'Door'
      value_template: "{{ states.sensor.fibaro_system_fgdw002_door_opening_sensor_2_access_control.state == '22' }}"

or

- platform: template
  sensors: 
    door:
      sensor_class: opening
      friendly_name: 'Door'
      value_template: "{{ is_state('sensor.fibaro_system_fgdw002_door_opening_sensor_2_access_control', '22') }}"
2 Likes

There you have a point @petro , you could indeed also do a == ‘22’.
Sometimes there are several ways to Rome :stuck_out_tongue: For me it works fine.

Has anyone got these working consistently - I just bought a batch. The way I see it the issue is that when it reports deep sleep aka 254 - then the template logic is flawed.

EG lets say you open the window we get 22 - system shows window is open, sensor then goes into deep sleep and doesn’t report 22 or indeed 23 for closing anymore but reports 254 - as this is not 22 now then the window gets reported as closed when it is still open.

I could use an automation to trigger an input boolean then a binary sensor based off the input boolean MY other thought is having a virtual MQTT binary sensor but before I go away and play - I wonder if anyone has got it working / have any better ideas.

Cheers

Stuart

I’m using it right now, the node is sleeping:

image

The status on the access control is not 254:

Are you using the correct sensor in home assistant? I’ve never seen mine ever return anything other than 22 or 23.

And worse case scenario is that you just account for that in your template:

- platform: template
  sensors: 
    door:
      sensor_class: opening
      friendly_name: 'Door'
      value_template: >
          {{ is_state('sensor.DOOR_access_control', '22') if states('sensor.DOOR_access_control') in ['22','23'] else states('sensor.door') }}
3 Likes

Pretty sure I have it set up correctly…

This info from Home Assistant

" ACCESS CONTROL ENTITY

  • access_control : These may vary between brands
    • 22 : Open
    • 23 : Closed
    • 254 : Deep sleep
    • 255 : Case open"

1 Like

Comparing product types - yours is showing as unknown rather than FGDW002 - I wonder is different firmwares or something?

I will go and play with your code - thank you :slight_smile:

Stuart

It’s possible. I don’t remember where I bought mine. Either way, the code I supplied should just ignore every case except for 22 and 23. That should solve your problem of it going to sleep in either case (open or closed) and it should maintain the state it was before going to sleep or ‘case open’.

EDIT: It may still ‘update’ the state, it’s just that it will go from “open” to “open” or “closed” to “closed”. You may need to build some safety into your automations to account for that.

1 Like

Thanks! Do you know if this will retain state between home assistant restarts - as this is for our holiday home where I often work on HA whilst am not there.

Cheers again - really appreciate your input.

Stuart

That I do not know as I’ve never done it.

Not sure if it helps as I think I have a v1.

    door_entrance:
      friendly_name: 'Eingangstür'
      value_template: >-
              {%- if is_state("sensor.fibaro_system_fgk10x_door_opening_sensor_access_control", "22") -%}
              open
              {%- else -%}
              closed
              {%- endif -%}

That doesn’t solve his problem, that’s similar to the template he is currently using.

Functionally that’s identical to the original, it’s just the long way of writing it.

1 Like

Bumping up this thread.

Just installed my device and i have no problem telling if the door is open or closed.

My problem is that I can only se the open/close sensor, Z-wave and genral_sensor.

Then I tried to follow this example in order to se all the sensors.

I edited the file zwcfg_0xdc8a4f19.xml according to the instructions above, but each time I restart HA the value of the Manufacturer is is restored to “10f”.

How do I change that value in order to se all my sensors?

Mine is sitting at “10f” and working just fine. Have you tried un-pairing and repairing it? I remember pairing was a pain in the ass.

There were a bunch of other sensors added besides “access_control” when I added this sensor to HA:
alarm_level
alarm_type
burglar
heat
power_management
sourcenodeid
Any idea what they are for and how to use them?

Only one I know about is burglar. That’s a flag that lets you know if the device is being physically tampered with.

They’re summarised here.

Generally speaking, the only one that’s going to matter to you is burglar.

1 Like

This is what I have, but when the sensor goes to 254 it’s still going to a ‘closed’ state… any ideas?

- platform: template
  sensors: 
    frontdoor:
      sensor_class: door
      friendly_name: Front Door
      value_template: " {{ is_state('sensor.fibaro_system_fgdw002_door_opening_sensor_2_access_control', '22') if states('sensor.fibaro_system_fgdw002_door_opening_sensor_2_access_control') in ['22','23'] else states('sensor.frontdoor') }} "