Closed szupi-ipuzs closed 11 months ago
Yes you need to include a "light" section in your yaml. The module will receive commands configured from the "light" section then. so with the same id and groupId and remote_type.
The point is I don't have any compatible lights, I only own a remote and want to use it to control my other lights. So it seemed kind of strange that I still need to add a light in yaml... But ok, I understand now that this is by design. Thanks!
You can "capture" the ID and remote type of your remote: when you use this example: https://github.com/hencou/esphome_components/blob/main/example_milight.yaml ..and set the logger level on "DEBUG": then you will see the received commands in the logging, with the ID and remote type of your remote. Configure a light with this values and you are ready to go.
Hi, I am trying to use your great mi component, but I only wanted the part with "on_command_received", so I stripped down the example yaml to this:
Unfortunately this does not compile then, because:
It seems the LightState package is not added automatically in such case, yet you still use it. I was trying to add an import line in init.py, but it still wasn't compiling... Eventually I used the whole example yaml and this time it worked.