Comments (10)
It is already supported by the sensor so I will add it as an attribute. Will look into this next week. No need to rush since the new beta period has already started. There would just be too many entities created if a switch would be generated for each sensor.
For turning on and off there already is a service for that. It's generic but you can just specify entity and send that payload.
from deconz.
Pushed an update, try it out now
from deconz.
PR is submitted to HASS, you can expect it to show up with release 0.74
from deconz.
Did some testing for this one also. Initial on
attribute state works. Changes are not reported.
I think it is related to the on
attribute missing here? https://github.com/Kane610/home-assistant/blob/c5d89ece993d02bc888e99bdbbf089d233b4c300/homeassistant/components/binary_sensor/deconz.py#L63
Here is the log after triggering the change of config.on
using the deconz.configure service:
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.utils] Sending {'data': '{"on": false}'} to http://192.x.x.x:80/api/<redacted-api-key>/sensors/62/config
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.utils] HTTP request response: [{'success': {'/sensors/62/config/on': False}}]
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.deconzdevice] Motion Sensor: update alert with none
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.deconzdevice] Motion Sensor: update battery with 100
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.deconzdevice] Motion Sensor: update delay with 0
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.deconzdevice] Motion Sensor: update ledindication with False
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.deconzdevice] Motion Sensor: update on with False
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.deconzdevice] Motion Sensor: update reachable with True
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.deconzdevice] Motion Sensor: update sensitivity with 2
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.deconzdevice] Motion Sensor: update sensitivitymax with 2
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.deconzdevice] Motion Sensor: update usertest with False
2018-07-02 21:23:11 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"config":{"alert":"none","battery":100,"delay":0,"ledindication":false,"on":false,"reachable":true,"sensitivity":2,"sensitivitymax":2,"usertest":false},"e":"changed","id":"62","r":"sensors","t":"event"}
Call is succesful. Websocket shows the new state of the config attribute (false). However, there is no update of the attribute in the Home Assistant entity
from deconz.
Thanks for testing it so rigorously! I apologise for all these misses
from deconz.
Thanks. I can confirm that all changes work as expected now.
from deconz.
Just for your information, I'm using this template switch to view and toggle the config.on
state of a motion sensor:
switch:
- platform: template
switches:
motion_kitchen:
value_template: "{{ states.binary_sensor.motion_kitchen.attributes.on }}"
turn_on:
service: deconz.configure
data:
field: /sensors/62/config
data:
"on": true
turn_off:
service: deconz.configure
data:
field: /sensors/62/config
data:
"on": false
from deconz.
Great! PR is approved so it is ready to be merged, perfect timing. Thanks for your support!
from deconz.
I might put this in as an example on how to use the "on" attribute. Nice idea!
from deconz.
It is now available on HASS dev branch
from deconz.
Related Issues (20)
- Error doing job: Task exception was never retrieved - KeyError: 'e' HOT 4
- Additional lighting effects and control HOT 2
- Expose CLIPGenericFlag sensors from deCONZ as switches to Home Assistant HOT 1
- Support for Philips Hue wall switch module HOT 4
- Deconz integration test issue HOT 1
- Add support for "Range extender" light type HOT 2
- Stuff to clean up from typing HOT 1
- Expose all available attributes of thermostat to HA bundled as device HOT 2
- 'requirements.txt' is missing in Pypi's SDIST since v90 HOT 3
- Feature request: expose more IKEA Starkvind functions to Home Assistant HOT 44
- Support events for Philips Tap Dial Switch HOT 31
- Feature request: expose more Aqara FP1 functions to Home Assistant HOT 5
- Device IP snippets
- Sensors are added to deConz but are not appearing in HA HOT 8
- Styrbar Automations deleted after update to 2023.1 HOT 2
- Smart plug consumption sensor "state is not strictly increasing" in HA HOT 1
- Legrand netatmo thermostat entitie doesn't work
- Unsupported device type ZHAParticulateMatter HOT 5
- Unknown devices for air quality HOT 4
- IKEA badring (Water Leak Sensor) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deconz.