Closed albertomontesg closed 2 years ago
By the way, I just saw this, but would it be possible to have a toggle button also for non-dimmable lights. This look strange to me:
gaetan
is dimmable, invite
is not
Maybe it's a home assistant feature, I don't know.
The difference you observed in Home assistant between dimmable and non dimmable lights doesn't come from the discovery thing. Actually all lights are only exposed as non-dimmable one as I haven't found any way to know if the device has been configured to be dimmable or not.
Also the type of icons you see I have never seen them in Home Assistant to control a light.
I have addressed all the comments as well as put the Home Assistant logic on its own file. Let me know what your think.
Correction on the previous comment: I managed to extract whether a device is dimmable or not by checking the outputMode and comparing it with some value. Not able to find it in the documentation, but checking my setup, I was able to infer it.
I addressed all the comments. Could you please approve to run the presubmit workflows as it is required approval for first-time contributions.
Seems like the secret to run goreleaser
is not present and is making fail the presubmit check.
Seems like the secret to run
goreleaser
is not present and is making fail the presubmit check.
It's really strange, I will have a look when I have time
Seems like the secret to run
goreleaser
is not present and is making fail the presubmit check.It's really strange, I will have a look when I have time
I guess it's because you don't have the secret in your fork (maybe...). All builds pass except the releaser (with the docker login). So I will merge this and do a release.
First of all I would like to thank you for this implementation between the DigitalStrom API and MQTT. This helped me to include around 25 devices into Home Assistant from the new apartment we are living in with very minimal effort.
This pull request implements the requested integration of
digitalstrom-mqtt
with Home Assistant by using MQTT Discovery mechanism.This change has been requested has been openly requested in #25, and also it has been a personal request for myself considering the amount of repetition happening in my personal config.
This Pull Request implements the following:
HOME_ASSISTANT_DISCOVERY_ENABLED
andHOME_ASSISTANT_DISCOVERY_PREFIX
) to enable the MQTT Discovery and customise the discovery prefix topic.light
orcover
) from the entity name in order to have a more simplifiedentity_id
in Home Assistant.http-client
implementation to reuse the same TCP connection on every GET request.This has been tested on my personal setup with correctly surfacing all the devices and the configuration working for all the entities (lights, covers and sensors).
MQTT Explorer:
Home Assistant Device Registry: