RaresAil / homebridge-tp-link-tapo

A platform to implement the tp-link tapo device and Adaptive Lighting for light bulbs
https://www.npmjs.com/package/homebridge-tp-link-tapo
Apache License 2.0
61 stars 5 forks source link

Unable to create automation from Tapo P110 Contact Sensor #61

Open jprabawa opened 9 months ago

jprabawa commented 9 months ago

Describe The Bug

There is no option in HomeKit to create an automation based on the state of the contact sensor. When the accessory is selected for automation, only the power state on / off is available for selection.

I think this might be fixed if the contact sensor is created as a separate accessory instead of a characteristic of the same accessory (that already has a power state)

Expected behavior

Able to use the contact sensor state for HomeKit automations

Logs

-

Plugin Config

    {
        "addresses": [
            "1.2.3.4"
        ],
        "name": "TPLink Tapo Platform",
        "email": "email@redacted.com",
        "password": "<REDACTED>",
        "platform": "HomebridgeTPLinkTapo",
        "_bridge": {
            "username": "11:22:33:44:55:66",
            "port": 12345
        }
    }

Plugin Version

v4.0.0

Homebridge Version

v1.6.1

Node.js Version

v18.17.0

NPM Version

v9.6.7

Operating System

Raspbian GNU/Linux 11

RaresAil commented 9 months ago

Hey, there is possible, i do have automation when i open the door at night to turn on the lights, you need to select to create an automation when a sensors detects something

image

jprabawa commented 9 months ago

Yes, that’s the category I selected. And when I select the plug, here is the screen I get:

IMG_9055

As you can see from the above, the home app won’t let me choose the contact sensor state, it only allows me to choose the power state of the plug.

RaresAil commented 9 months ago

I see, so you want to automate the contact sensor from the plug itself, in that case the ticket tile is wrong as you specified T110

jprabawa commented 9 months ago

Ah my bad. I’ve fixed the title. I meant to say P110

RaresAil commented 9 months ago

Great, i will let you know when i will start on this