Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daylightsensor not working #1049

Open
PeterSchmidt23 opened this issue Sep 30, 2024 · 4 comments
Open

Daylightsensor not working #1049

PeterSchmidt23 opened this issue Sep 30, 2024 · 4 comments

Comments

@PeterSchmidt23
Copy link

Issue does not already exist?

I have searched and found no existing issue

Select Environment

Docker

Home Assistant related?

Yes

Description

I created a simple automation to switch my lights on/off depending on sunrise/sunset condition. There is currently only one light configured.
I expected the lights to turn on/off, but there was only the exception in the logs.
It seems that only an array is passed to the rulesProcessor, but it is expecting a device.

Errorlog:


2024-09-30 19:11:12,244 - services.stateFetch - 12 - INFO - start lights sync
Exception in thread Thread-52:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/hue-emulator/functions/daylightSensor.py", line 42, in daylightSensor
    rulesProcessor(["sensors","1"], current_time)
  File "/opt/hue-emulator/functions/rules.py", line 100, in rulesProcessor
    logging.debug("Processing rules for " + device.name)
AttributeError: 'list' object has no attribute 'name'

Steps to reproduce

Use HUE oder HUE Essentials app
Create a new automation
Select sunrise and sunset for your trigger
Select lights

Please enter your operating system details here

Hue-Emulator Version: 2024-09-30 14:00:08.000000000
WebUI Version: 2024-09-30 14:00:17.000000000
Architecture: aarch64
OS: Linux
Linux version: #1 SMP PREEMPT Wed Aug 21 16:30:30 UTC 2024
Linux release: 6.6.31-haos-raspi
Hardware: %Hardware%

Upload debug tar

This can be downloaded from the webUI.
DiyHue > Bridge > Brdige Control > Download debug > Full debug
Do not upload from Force config dump, Fo
rce config dump contains sensitive information
``
[config_debug.zip](https://github.com/user-attachments/files/17196279/config_debug.zip)


### What DiyHue version(branch) are you using?

master (latest)
@hendriksen-mark
Copy link
Member

hi, i made changes to fix this. please try and give feedback.

@PeterSchmidt23
Copy link
Author

Thank you. Can you please bump the addon version.

@hendriksen-mark
Copy link
Member

sorry forgot to change the config.json in ha addon

@PeterSchmidt23
Copy link
Author

Thank you. It seems that HA is not pulling the changes.
I deleted the add on, did a rebuild and the code is still from the .18 version, while HA is showing the .19 version.
I will look at this later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants