Switch manager is a centralised component to handle button pushes for your wireless switches. This includes anything passed through the event bus. The component relies on switch blueprints which is easily made to allow GUI configuration of your switches and their button pushes. This helps remove clutter from the automations.
All uploaded images should not exceed the maximum width of 800px as stated below in the checklist. But in the UI, very wide images get upscaled to full browser width instead of being limited to 800px.
I solved the problem for me by adding max-width to #switch-image > svg in switch_manager_panel.js. The result you can see in the screenshot below. But I don't know if that is the cleanest solution and I also don't know if changing that in the ts file is correct. If you have a better solution, feel free to close this PR.
[ ] You ordered the actions as stated in the README action order
[ ] All filenames are lowercase and uses '-' for spaces and not '_' while using {service-name}-{switch-name-or-type}.yaml format
[ ] Images are png
[ ] Image backgrounds are transparent and is cropped to the device boundries
[ ] Images has a maximum width of 800px and maximum height of 500px
[ ] There are no missing buttons or actions
[ ] Your integration/service is running on the latest version
[ ] You have tested your blueprints and made sure each button and action works
Zigbee2MQTT
[ ] (older devices) You have ensured legacy is off/false for the device in the Z2M devices Settings (specific) page and that your actions matches those with legacy off?
All uploaded images should not exceed the maximum width of 800px as stated below in the checklist. But in the UI, very wide images get upscaled to full browser width instead of being limited to 800px. I solved the problem for me by adding
max-width
to#switch-image > svg
inswitch_manager_panel.js
. The result you can see in the screenshot below. But I don't know if that is the cleanest solution and I also don't know if changing that in the ts file is correct. If you have a better solution, feel free to close this PR.Before:
After:
![image](https://github.com/Sian-Lee-SA/Home-Assistant-Switch-Manager/assets/30938717/6a72345a-f9a5-4a63-89e1-847c93cb93ba)
Blueprint Checklist
Zigbee2MQTT