Daylight Sensor Disabled - How to enable?

Hi there,

i have tried out Home Assistant instead of the Phoscon PWA, but in the end i decided to stick with Phoscon. But now, i have a problem, the virtual daylight sensor is disabled.
Maybe because of this? (deCONZ - Home Assistant) It seems that Home Assistant disables the daylight sensor for privacy reasons.

I’m using a pi 4, conbee II, homeassistant and deconz are hosted via docker.

version: ‘3.7’

networks:
web:
external: true

services:
deconz:
image: deconzcommunity/deconz
container_name: deconz
restart: always
privileged: true
networks:
- web
ports:
- 8080:8080
- 8443:8443
volumes:
- ${USERDIR}/deconz:/opt/deCONZ
devices:
# USB Device
- /dev/ttyAMA0
environment:
- TZ=${TZ}
- DECONZ_WEB_PORT=8080
- DECONZ_WS_PORT=8443
- DEBUG_INFO=1
- DEBUG_APS=0
- DEBUG_ZCL=0
- DEBUG_ZDP=0
- DEBUG_OTAU=0
- DECONZ_UID=1000
- DECONZ_GID=1000
security_opt:
- no-new-privileges:true

I have already tried to change the sensor values via the REST-Api, without success.
This is the current state of the sensor:

               {

“config”: {
“configured”: false,
“on”: true,
“sunriseoffset”: 30,
“sunsetoffset”: -30
},
“etag”: “33f82a52e3156b86001cf58444de5437”,
“manufacturername”: “Philips”,
“modelid”: “PHDL00”,
“name”: “Daylight”,
“state”: {
“dark”: null,
“daylight”: null,
“lastupdated”: “none”,
“status”: null
},
“swversion”: “1.0”,
“type”: “Daylight”,
“uniqueid”: null
}

i tried this command:

PUT http://pi-ip:8080/api/Api-Key/sensors/1/config
{
“configured”: true
}

Response:

[{
“error”: {
“address”: “/sensors/1/config/configured”,
“description”: “Could not set attribute”,
“type”: 608
}
}]

Thank you already in advance!

For the daylight sensor to work the longitude and latitude need to be configured. Usually this happens automatically but can be done via REST call as well, Sensors - deCONZ REST-API

An easier option to configure the sensor is via Hue Essentials app which has a small UI for doing this.

1 Like

Thank you very much! I just used the Hue Essentials App and was able to fix it!

1 Like