ualex73 / monitor_docker

Monitor Docker containers from Home Assistant
Apache License 2.0
301 stars 37 forks source link

Add Restart Button for containers #137

Closed briodan closed 5 months ago

briodan commented 1 year ago

I found it handy to have a restart button for containers that I can push from a dashboard.

briodan commented 5 months ago

moved the button to asyncio based on the work in PR #140

ualex73 commented 5 months ago

I am happy to merge this one, but can you put the default too disable for this button feature? I think most users will not prefer it, if even more entities are added to HA.

So change: vol.Optional(CONF_BUTTONENABLED, default=True): vol.Any( to: vol.Optional(CONF_BUTTONENABLED, default=False): vol.Any(

briodan commented 5 months ago

my use case is to have an auto entities card that auto-populates with the reboot buttons for all containers, that way as i add/remove containers the reboot button automatically shows up and i don't have to manage it.

maybe this can be added as a configuration option, so the button is disabled by default but can be enabled by default if the user choses it, but that might be to big of a code change. Can probably achieve that with an automation of sorts.

i'll update the code shortly so this can be merged in and can look at the rest as a separate PR

ualex73 commented 5 months ago

I just merged the change in the master.