RA3/QSX Button LED Names don't identify the Keypad and Button
danaues opened this issue · 9 comments
@cbw, Amazing work on the QSX support, and for adding LED and button press support.
I've been testing with my setup, and I think it would help to use a more meaningful name for the Keypad LEDs
I have 2 keypads in this area, a 3BRL and a 4B. It's hard to tell which led these belong too.
Ideally they would be named "LED_Hallway Main Stairs_Position 1_Button2" or something like that.
Thanks for catching that! I may have had a regression, thought I fixed it (or perhaps it was in the HA side of the code I was working on). I'll take a look tonight.
@cbw, FYI another PR was just merged for the lutron_caseta HA component to fix a regression in the handling of 'None' serials.
In case this affects your HA testing.
My system is returning an empty string for button_engraving["Text"]. The "Engraving" key exists, so button_engraving doesn't get assigned 'None', just returns a dict with an empty "Text".
pylutron-caseta/pylutron_caseta/smartbridge.py
Lines 918 to 927 in 72fd4ca
changing the if statement to :
if button_engraving is not None and button_engraving["Text"]:
fixes it for me.
Might be a better way though
For the naming, it would be nice to keep the button naming consistent with the Keypad naming.
pylutron-caseta/pylutron_caseta/smartbridge.py
Lines 958 to 970 in 72fd4ca
Instead of station_name we could use keypad name, and join it to the button_name LED
keypad_name = keypad_device["name"]
name="_".join((keypad_name, f"{button_name} LED")),
Great suggestions – incorporated these and tested, looks good on my test QSX processor as well. Submitted #110 with this update.
Now I just need to get my HomeAssistant button code cleaned up and submitted! The HA button situation is a little messy, and may take some refactoring to make clearer with what's in there now for handling Pico events.
Let me know if there is anything I can help with, I"m happy to help test.
@danaues any tips from your experiencing making a PR on homeassistant-core, especially on testing? Are you on the Home Assistant discord by chance?
@cbw, unfortunately, I'm not on the discord. I could join though.
bdraco was great at helping out, was quick to respond and was eager to have new contributors.
I think he's travelling right now, but he will approve and be a great resource.
Do you want me to test anything before you create the PR?