GithubHelp home page GithubHelp logo

KeyError:'lux' about hue-sensors-hass HOT 6 CLOSED

robmarkcole avatar robmarkcole commented on July 19, 2024
KeyError:'lux'

from hue-sensors-hass.

Comments (6)

robmarkcole avatar robmarkcole commented on July 19, 2024 1

@mf-social yes I was confused, moved to your original issue and reopened. Cheers

from hue-sensors-hass.

robmarkcole avatar robmarkcole commented on July 19, 2024

I parsed your data with the hue-sensors library and got no errors (please check all sensors are present). Is this an intermittent issue?

import hue_sensors as hs
hs.__version__
1.2
filename = "/Users/robincole/Desktop/hue_error_issue.json"
response = hs.load_json_file(filename)
data = hs.parse_hue_api_response(response)
data
{'RWL_10-02': {'battery': 100,
  'last_updated': ['2018-01-21', '08:10:23'],
  'model': 'RWL',
  'name': 'Living room switch',
  'state': '1_click'},
 'RWL_eb-02': {'battery': 100,
  'last_updated': ['2018-01-21', '07:52:07'],
  'model': 'RWL',
  'name': 'Kitchen switch',
  'state': '1_click'},
 'SML_74-02': {'battery': None,
  'last_updated': ['none'],
  'light_level': 'No light level data',
  'model': 'SML',
  'name': 'Hue motion sensor motion 1',
  'state': 'off',
  'temperature': 'No temperature data'},
 'SML_97-02': {'battery': 100,
  'dark': True,
  'daylight': False,
  'last_updated': ['2018-01-20', '22:26:12'],
  'light_level': 0,
  'lux': 1.0,
  'model': 'SML',
  'name': 'Dining Room motion sensor',
  'state': 'off',
  'temperature': 19.27},
 'SML_ad-02': {'battery': 100,
  'dark': True,
  'daylight': False,
  'last_updated': ['2018-01-21', '08:31:31'],
  'light_level': 8874,
  'lux': 7.71,
  'model': 'SML',
  'name': 'motion Corridor',
  'state': 'off',
  'temperature': 19.05},
 'SML_d0-02': {'battery': 100,
  'dark': False,
  'daylight': False,
  'last_updated': ['2018-01-21', '08:44:02'],
  'light_level': 16455,
  'lux': 44.2,
  'model': 'SML',
  'name': 'Kitchen motion Sensor',
  'state': 'off',
  'temperature': 17.25}}

from hue-sensors-hass.

robmarkcole avatar robmarkcole commented on July 19, 2024

Please see here. What is the device id causing your issue and does anything look strange about its data? Cheers

from hue-sensors-hass.

point-4ward avatar point-4ward commented on July 19, 2024

I'm confused, I posted that in the issue you generated (#40) in relation to my previous issue (#37), I think that the duplicate device id you're seeing in (#40) is because of some kind of endless loop but I don't understand python anywhere near enough to dive in and help.

If it fixes this issue too, happy days, but I did not get this error, and hadn't seen this issue so not sure why the comment was moved here.

from hue-sensors-hass.

TheCellMC avatar TheCellMC commented on July 19, 2024

Okay, so it seems that my Philips Hue sensor was faulty, as it was not reporting it's temperature and luminosity to the hub. So I removed it from my Philips Hue Hub and I'm not getting this problem with my other Philips motion sensors.

from hue-sensors-hass.

willfinnigan avatar willfinnigan commented on July 19, 2024

My sensor has randomly stopped working out of the blue.. its not reporting luminosity to the hub anymore :( Anyway to get this working only for motion? Or if anyone figures out a way to magically fix the sensor I'd love to know.. tried new batteries, renaming and restarting the hub to no avail.

from hue-sensors-hass.

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.