Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Expose Lutron RA2 occupancy sensors #25854
Expose Lutron RA2 motion sensors
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
If the code does not interact with devices:
Oh sorry didn't see the comment about squashing and did it again.…
On Sun, Aug 11, 2019, 1:52 PM Martin Hjelmare ***@***.***> wrote: *@MartinHjelmare* commented on this pull request. ------------------------------ In homeassistant/components/lutron/binary_sensor.py <#25854 (comment)> : > + """Return true if the binary sensor is on.""" + # Error cases will end up treated as unoccupied. + return self._lutron_device.state == OccupancyGroup.State.OCCUPIED + + @Property + def device_class(self): + """Return that this is an occupancy sensor.""" + return DEVICE_CLASS_OCCUPANCY + + @Property + def name(self): + """Return the name of the device.""" + # The default LutronDevice naming would create 'Kitchen Occ Kitchen', + # but since there can only be one OccupancyGroup per area we go + # with something shorter. + return "%s Occupancy" % self._area_name This is an f-string.
Oh, thanks for the pointer. I find git and github baffling :)…
On Tue, Aug 13, 2019 at 7:08 PM benjimatt ***@***.***> wrote: im assuming @achatham <https://github.com/achatham> still needs to remove "import logging" since it is unused to pass the tests..... By the way thanks for the hard work @achatham <https://github.com/achatham> , cant wait for this to get implemented. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#25854?email_source=notifications&email_token=AAU22YIZ267HYAI6U5GDIKLQENSJ3A5CNFSM4IK2LYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4HPQZQ#issuecomment-521074790>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAU22YIPEZJ33EZBDH4GYBTQENSJ3ANCNFSM4IK2LYMQ> .