mrwiwi / tydom2mqtt

Link between a Delta Dore's Tydom Hub and and a MQTT broker, unofficial of course.
MIT License
28 stars 17 forks source link

Add support for KLine window sliding and fix sensor creation when openState is missing #32

Closed iGranDav closed 3 years ago

iGranDav commented 3 years ago

I have sliding windows which looks like this

{
    "last_usage": "klineWindowSliding",
    "id_device": 1616974133,
    "name": "Bureau droit",
    "picto": "picto_detect_window_sliding1",
    "first_usage": "klineDetect",
    "id_endpoint": 1616974133
}

Data is the same than a kline french window, so I've added support for this 🙂

Also I fixed the sensor creation when 'openState' is missing, which is the case of my service door (klineDoor). I think this is what @RomainGx wanted to fix in #31 too. My proposition may not be ideal but its working 🙂