Giter Club home page Giter Club logo

Comments (21)

snozzlebert avatar snozzlebert commented on June 20, 2024 1

I'm sorry to bother you again. I think I've found an issue in the GenericFlag class. The is_tripped function is missing. When I use the new code in Home Assistant I get:

  File "homeassistant\components\binary_sensor\deconz.py", line 71, in is_on
    return self._sensor.is_tripped
AttributeError: 'GenericFlag' object has no attribute 'is_tripped'

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024 1

PR is updated

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024

What is the use case for this? From the look of it this will be a binary sensor. Could you post the json data for a generic flag?

from deconz.

snozzlebert avatar snozzlebert commented on June 20, 2024

My use case is similar the the one described in this comment: dresden-elektronik/deconz-rest-plugin#98 (comment)
I'm using the rule engine of deCONZ and the CLIPGenericFlag is acting as a room's master switch.
I would like to see the state of this "master switch" (the flag) in Home Assistant.

Binary sensor would be ok for me.
What kind of JSON data do you need?
My flag sensor:

{
        "config": {
            "on": true,
            "reachable": true
        },
        "modelid": "Switch",
        "name": "Kitchen Switch",
        "state": {
            "flag": true,
            "lastupdated": "2018-07-01T10:40:35"
        },
        "swversion": "1.0.0",
        "type": "CLIPGenericFlag",
        "uniqueid": "kitchen-switch"
    }

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024

Seems about right for the flag to be the main state. The Json data you gave me is good enough 👍

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024

Solved in v40.

PR is submitted to HASS, you can expect it to show up with release 0.74

from deconz.

snozzlebert avatar snozzlebert commented on June 20, 2024

Thanks! One remark:
In the code is see:

GENERICFLAG = ['CLIPGenericFLAG']

shouldn't that be:

GENERICFLAG = ['CLIPGenericFlag']

if matching is case sensitive?
My JSON shows "type": "CLIPGenericFlag",

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024

You're right. Good catch!

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024

Updated PR

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024

Thanks for verifying, will fix immediately

from deconz.

Krocko avatar Krocko commented on June 20, 2024

Would it be possible to expose the CLIPGenericFlag as a switch to home assistant so we can toggle the flag easily in Home Assistant on and off?

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024

@Krocko can you create a new issue with examples on how it is set, and why it is useful

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024

https://github.com/ebaauw/homebridge-hue/wiki/Getting-Started#24-clip-sensors

from deconz.

Krocko avatar Krocko commented on June 20, 2024

Hi @Kane610. Any news?

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024

I'm nearly done working on the UniFi integration, but I will put my time on the Axis integration prior to revisiting deconz

from deconz.

Krocko avatar Krocko commented on June 20, 2024

Ok. Thank you for the info.

from deconz.

Krocko avatar Krocko commented on June 20, 2024

Hello @Kane610 any update on this?

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024

No news, haven't investigated this at all

from deconz.

Krocko avatar Krocko commented on June 20, 2024

Hi @Kane610. Do you have any news?

from deconz.

Kane610 avatar Kane610 commented on June 20, 2024

Still waiting on examples

[Kane610](https://github.com/Kane610) commented [on 21 Dec 2019](https://github.com/Kane610/deconz/issues/14#issuecomment-568201742)
@Krocko can you create a new issue with examples on how it is set, and why it is useful

from deconz.

Krocko avatar Krocko commented on June 20, 2024

Hello @Kane610
Do you need more info?

from deconz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.