Git Product home page Git Product logo

Comments (13)

Kane610 avatar Kane610 commented on September 6, 2024 1

That is way too specific to do. Im looking into if I can better fit this into hass integration rather than library

from deconz.

Kane610 avatar Kane610 commented on September 6, 2024

Sure, I can take that into consideration, can you clarify if this would work the same for all types of entities?

from deconz.

jasperslits avatar jasperslits commented on September 6, 2024

According http://dresden-elektronik.github.io/deconz-rest-doc/sensors/ upon sensor creation it defaults config.on to True and it's part of the JSON GET response upon querying sensors.

So it's safe to assume that it's available for all sensors and it doesn't seem to distinct between the types one has available in HA.

from deconz.

jasperslits avatar jasperslits commented on September 6, 2024

For the PR I can create: do you think this change should go into pydeconz package or the deconz/binary_sensor in the HA component?

from deconz.

Kane610 avatar Kane610 commented on September 6, 2024

I would like the change to be as generic as possible so I need to look into that

from deconz.

jasperslits avatar jasperslits commented on September 6, 2024

Got it, I have quite a few sensors (presence, temperature from Philips and Xiaomi etc) linked to Deconz so I can help with testing if you want to implement it yourself

from deconz.

Kane610 avatar Kane610 commented on September 6, 2024

Awesome!

from deconz.

jasperslits avatar jasperslits commented on September 6, 2024

Any idea when you'll have time for it?

I gave the C++ change a try (rest_sensors.cpp) and the code compiles yet it doesn't emit anything in the debugging log. And as Deconz is running in Docker, replacing the .so plugin is quite complex. It should be possible to suppress the firing of the event according to the Deconz Discord channel but it seems quite tricky. So I think the Python solution would probably be easier to going

from deconz.

Kane610 avatar Kane610 commented on September 6, 2024

No sorry, I'm currently on vacation, also focusing on the Axis integration

from deconz.

jasperslits avatar jasperslits commented on September 6, 2024

Hi,

How do you want to go forward with this?
I modified is_tripped method of the Presence class in /usr/local/lib/python3.8/site-packages/pydeconz/sensor.py to read:

   @property    
    def is_tripped(self):
        """Sensor is tripped."""
        return self.presence and self.on

That works as expected and I can create a PR for that unless you think that handling this config.on should be handled in the Deconz cpp code? This change is limited to the motion sensor because I dont know a good user story for the config.on with other sensors like temperature, light level or water etc.

from deconz.

Kane610 avatar Kane610 commented on September 6, 2024

Have you considered to just use the "on" attribute as a condition in your automations

from deconz.

jasperslits avatar jasperslits commented on September 6, 2024

Great suggestion and Version 0.115 to the rescue as I can now put a condition on the state attribute “on” with true / false via the UX.

I had 0.115 running since launch but didn’t realize this “problem” could be solved with just config.

Closing this as this new functionality request is no longer relevant.

from deconz.

Kane610 avatar Kane610 commented on September 6, 2024

Awesome!

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.