Closed crazystick closed 2 years ago
I have the same issue/requirement and I agree with your idea.
In the Lutron component, it calls the library for lights via https://github.com/home-assistant/core/blob/dev/homeassistant/components/lutron_caseta/light.py#L44
The code for this translates the "light" into the Lutron Leap types. This loops around on all the types and returns them https://github.com/gurumitts/pylutron-caseta/blob/855b339e257681ae5e65caeb98a1a09030172073/pylutron_caseta/smartbridge.py#L200
I think the issue is that https://github.com/gurumitts/pylutron-caseta/blob/855b339e257681ae5e65caeb98a1a09030172073/pylutron_caseta/__init__.py#L8 doesn't include "InLineDimmer" and "InLineSwitch" so they are not being included in HA.
The original commit was https://github.com/gurumitts/pylutron-caseta/issues/8 so I think it's just been missed off the list?
It looks like this has been included with the support for RA3.
Could we do a smaller PR just for these two types?
@BenHall Agree. Would also like to add the devices listed in issue #98, but I've yet to secure these devices and test for their identity for inclusion. Anyone here know another way to discover these?
@iCSpotRun Sadly not. I only have inline dimmers and switches which makes the response in the first post.
I also don't have access to anything else beyond what I added in the initial comment I'm afraid.
Small update. I patched __init__.py
in my home assistant installation, the lights show up, and they are controllable and dimmable.
Small update. I patched
__init__.py
in my home assistant installation, the lights show up, and they are controllable and dimmable.
I missed the update. That's great news. Can you share a gist or fork of your changes please?
have created PR #104 with these changes.
I run HA in docker using docker-compose. I tested these changes using the following docker-compose.yml:
version: '3'
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- config:/config
- /srv/homeassistant/pylutron_caseta_init_py:/usr/local/lib/python3.10/site-packages/pylutron_caseta/__init__.py
environment:
- TZ=Europe/Tallinn
restart: unless-stopped
privileged: true
network_mode: host
volumes:
config:
driver: local
driver_opts:
type: none
device: /srv/homeassistant/volumes/config
o: bind
I have the RA2 Select system I'd like to use with HA. The scenes work within HA so I'm hoping that just adding
InLineDimmer
andInLineSwitch
to _LEAP_DEVICE_TYPES will just work. Only started with HA last night but happy to test something with a bit of guidance.Here's a snippet from HA's diagnostic: