Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

new device_tracker shows Zone not defined #151

Closed
Mariusthvdb opened this issue Jun 25, 2019 · 10 comments · Fixed by #154
Closed

new device_tracker shows Zone not defined #151

Mariusthvdb opened this issue Jun 25, 2019 · 10 comments · Fixed by #154

Comments

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Jun 25, 2019

Hi,

thanks again for updating the device_tracker part of the CC. Think I have it setup as it should, and a new device_tracker is discovered nicely.
But, this is frequently in the logs:

019-06-25 15:01:13 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/hue_custom/device_tracker.py", line 99, in async_see_sensor
    zone_home = self.hass.states.get(zone.ENTITY_ID_HOME)
NameError: name 'zone' is not defined

please have a look what that could be?
thanks

@Mariusthvdb
Copy link
Contributor Author

just as a gentle reminder: has this been recognized?

@robmarkcole
Copy link
Owner

Ping @yottatsa

@Mariusthvdb
Copy link
Contributor Author

Ok, thanks. I take it tagging @yottatsa has now already been done ;-) Please Vladimir, would you have a look?

@jdaury
Copy link

jdaury commented Jul 7, 2019

Have the same issue in logs and unfortunately the device tracker is not working, could it be related?

@lweberru
Copy link

same issue here...

@ChrisLStark
Copy link

Same here... thought it was just my setup

@Mariusthvdb
Copy link
Contributor Author

Mariusthvdb commented Jul 22, 2019

@yottatsa please re-open, this is still occurring:

2019-07-22 14:39:32 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/hue_custom/device_tracker.py", line 99, in async_see_sensor
    zone_home = self.hass.states.get(zone.ENTITY_ID_HOME)
NameError: name 'zone' is not defined

now on HA 96.3 with the latest update of the device_tracker.

@robmarkcole robmarkcole reopened this Jul 22, 2019
@yottatsa
Copy link
Contributor

@Mariusthvdb check that you don't have any caches, and that the import is correct. It works for me.

>>> import huesensor.device_tracker
>>> huesensor.device_tracker.zone.ENTITY_ID_HOME
'zone.home'

@Mariusthvdb
Copy link
Contributor Author

letting you know that somehow my update didn't stick, and upon further inspection, my device_tracker.py hadn't been overwritten, still showing version 1.5...

deleted it now and reinstated with the new version. Seems to be behaving better....
no error in the log, and an online device_tracker.
Now lets hope it follows the online status of the device for a fact.

sorry for the false alarm. might have been correct all the time after all...

check that .... and that the import is correct.

just for my education: how should I do that?

@robmarkcole
Copy link
Owner

@Mariusthvdb from inside the home assistant environment run python3 3 and execute the commands @yottatsa wrote. Thanks

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

Successfully merging a pull request may close this issue.

6 participants