alexander-vitishchenko / hc3-to-mqtt

Fibaro HC3 integration with Home Assistant & NodeRed
MIT License
31 stars 13 forks source link

Door sensor not correctly detected. #57

Open rwijbenga opened 1 year ago

rwijbenga commented 1 year ago

Hi,

I have a few Fibaro door / Window sensors, and a 3 where not the correct type in Home Assistant. On inspection of the device I saw it has a different type name:

"type": "com.fibaro.FGDW002", "baseType": "com.fibaro.doorWindowSensor", "enabled": true, "visible": true, "isPlugin": false, "parentId": 1441, "viewXml": false, "hasUIView": false, "configXml": false, "interfaces": [ "battery", "fibaroBreach", "fibaroFirmwareUpdate", "remoteDevice", "tamper", "zwave", "zwaveAlarm", "zwaveMultiChannelAssociation", "zwaveWakeup"

I have added this to your code to test it:

elseif self:fibaroDeviceTypeMatchesWith("com.fibaro.doorWindowSensor") then if self:fibaroDeviceTypeMatchesWith("com.fibaro.doorSensor") or self:fibaroDeviceTypeMatchesWith("com.fibaro.FGDW002") then self.subtype = "door" self.icon = "🚪" -- 🚪

And now it is the correct type in Home Assistant. :)

So if you could add that to your source code then if other have that model it is also detected correctly.

If you need more info let me know.

alexander-vitishchenko commented 6 months ago

Hi @rwijbenga can you please advise if this is still relevant for you, and did you try using https://www.home-assistant.io/integrations/fibaro/? Curious to see how many devices are supported, besides it might be simpler to configure without MQTT