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

Commit

Permalink
Added underscores to last updated attributes
Browse files Browse the repository at this point in the history
Though light_level had an underscore, last updated did not, so was causing a problem when making a template sensor. Added underscores to each instance of last updated to make it last_updated.
  • Loading branch information
marthoc committed Nov 18, 2017
1 parent e21699f commit 3a80e6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/sensor/hue.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def update(self):
self._hue_id]['light_level']
self._attributes['battery'] = self._data.data[
self._hue_id]['battery']
self._attributes['last updated'] = self._data.data[
self._attributes['last_updated'] = self._data.data[
self._hue_id]['last_updated']
self._attributes['lux'] = self._data.data[
self._hue_id]['lux']
Expand All @@ -108,13 +108,13 @@ def update(self):
self._hue_id]['temperature']
elif self._model == 'RWL':
self._icon = 'mdi:remote'
self._attributes['last updated'] = self._data.data[
self._attributes['last_updated'] = self._data.data[
self._hue_id]['last_updated']
self._attributes['battery'] = self._data.data[
self._hue_id]['battery']
elif self._model == 'ZGP':
self._icon = 'mdi:remote'
self._attributes['last updated'] = self._data.data[
self._attributes['last_updated'] = self._data.data[
self._hue_id]['last_updated']
elif self._model == 'Geofence':
self._icon = 'mdi:cellphone'

0 comments on commit 3a80e6b

Please sign in to comment.