Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Assistant integration #1

Open
akhudek opened this issue Oct 25, 2021 · 5 comments
Open

Home Assistant integration #1

akhudek opened this issue Oct 25, 2021 · 5 comments

Comments

@akhudek
Copy link

akhudek commented Oct 25, 2021

Hey,

I packaged up your home assistant integration so that I could install it easier. It links to your repo, hope you don't mind. Happy to transfer this to you if you want.

https://github.com/akhudek/legrand_rflc

@rtyle
Copy link
Owner

rtyle commented Oct 25, 2021 via email

@rtyle rtyle closed this as completed Nov 19, 2021
@rtyle rtyle reopened this Nov 19, 2021
@akhudek
Copy link
Author

akhudek commented Nov 19, 2021

Seeing this open and close reminded me, I do have some feedback. The light entities this produces don't have an associated device. This makes creating automations with the UI impossible as the UI for whatever reason forces you to select a device for an action. You can of course drop to json to create an automation, but it probably should create a device representing the hub and have the lights associated with it.

I was starting to look into doing that patch myself, but so far haven't figured it out.

@rtyle
Copy link
Owner

rtyle commented Nov 20, 2021

Sadly, the mDNS host LCM1.local doesn't work due to mDNS not working inside home assistant docker containers.

Yes, it seems that the homeassistant docker container only uses its /etc/hosts file and DNS to resolve names. DNS appears to be configured by using the same /etc/resolv.conf as its host.

You can add to the container's /etc/hosts file with the "docker run --add-host" option (see docker documentation).

Alternately, you could configure the docker host's /etc/resolv.conf to a properly configured systemd-resolved implementation which can resolve DNS queries using mDNS.

@akhudek
Copy link
Author

akhudek commented Nov 20, 2021

Alternately, you could configure the docker host's /etc/resolv.conf to a properly configured systemd-resolved implementation which can resolve DNS queries using mDNS.
Yeah, I may try this. Sadly the home assistant OS doesn't come configured this way, though I recently switched to ubuntu + docker container.

On the topic of devices, I did manage to add both a device for each switch as well as a device for the hub. Originally I was just going to have a device for the hub and have all the light entities attached to it. I couldn't figure out how to link the entities to the hub device though.

What I currently have is each light entity creating a light device (e.g. Porch Switch, Bedroom Dimmer), and those are linked to the hub device using the "via_device" property. That said I'm not at all sure what the hub device adds here, so maybe it's better if I just delete it and have one device for each light?

I could probably spend a bit more time and get the entities linked to the hub device too. Then it would be one device with all entities attached. I'm not sure which approach is better.

@rtyle
Copy link
Owner

rtyle commented Nov 23, 2021

... devices ...

Yes, I see that this is an issue but it is not an issue against this repository.

As I mentioned, I am trying to get the legrand_rflc integration accepted into the home-assistant core.
Reviews are now in progress but I'd rather not complicate them with this unless there is good reason.

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

No branches or pull requests

2 participants