File tree Expand file tree Collapse file tree 4 files changed +634
-0
lines changed
homeassistant/components/portainer
tests/components/portainer/snapshots Expand file tree Collapse file tree 4 files changed +634
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,26 @@ class PortainerButtonDescription(ButtonEntityDescription):
7474 )
7575 ),
7676 ),
77+ PortainerButtonDescription (
78+ key = "pause" ,
79+ translation_key = "pause_container" ,
80+ entity_category = EntityCategory .CONFIG ,
81+ press_action = (
82+ lambda portainer , endpoint_id , container_id : portainer .pause_container (
83+ endpoint_id , container_id
84+ )
85+ ),
86+ ),
87+ PortainerButtonDescription (
88+ key = "resume" ,
89+ translation_key = "resume_container" ,
90+ entity_category = EntityCategory .CONFIG ,
91+ press_action = (
92+ lambda portainer , endpoint_id , container_id : portainer .unpause_container (
93+ endpoint_id , container_id
94+ )
95+ ),
96+ ),
7797)
7898
7999
Original file line number Diff line number Diff line change 11{
22 "entity" : {
3+ "button" : {
4+ "pause_container" : {
5+ "default" : " mdi:pause-circle"
6+ },
7+ "resume_container" : {
8+ "default" : " mdi:play"
9+ }
10+ },
311 "sensor" : {
412 "api_version" : {
513 "default" : " mdi:api"
Original file line number Diff line number Diff line change 6666 "images_prune" : {
6767 "name" : " Prune unused images"
6868 },
69+ "pause_container" : {
70+ "name" : " Pause container"
71+ },
6972 "restart_container" : {
7073 "name" : " Restart container"
74+ },
75+ "resume_container" : {
76+ "name" : " Resume container"
7177 }
7278 },
7379 "sensor" : {
You can’t perform that action at this time.
0 commit comments