home-assistant: toggle printer with button hold
This commit is contained in:
parent
d1a9626cb7
commit
33a99fb1cd
2 changed files with 17 additions and 0 deletions
|
@ -61,9 +61,22 @@ in {
|
||||||
options = [ "default" "night" ];
|
options = [ "default" "night" ];
|
||||||
};
|
};
|
||||||
input_boolean.situation_toggle.icon = "mdi:toggle-switch";
|
input_boolean.situation_toggle.icon = "mdi:toggle-switch";
|
||||||
|
input_boolean.printer_toggle.icon = "mdi:toggle-switch";
|
||||||
|
|
||||||
automation = [
|
automation = [
|
||||||
|
|
||||||
|
{
|
||||||
|
alias = "Hold Button -> Toggle Printer";
|
||||||
|
trigger = {
|
||||||
|
platform = "state";
|
||||||
|
entity_id = "input_boolean.printer_toggle";
|
||||||
|
};
|
||||||
|
action = {
|
||||||
|
service = "switch.toggle";
|
||||||
|
data.entity_id = "switch.pal02";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
alias = "set light-control scene";
|
alias = "set light-control scene";
|
||||||
trigger = {
|
trigger = {
|
||||||
|
@ -80,6 +93,7 @@ in {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# control situation with buttons
|
# control situation with buttons
|
||||||
{
|
{
|
||||||
alias = "Button -> Change Scene";
|
alias = "Button -> Change Scene";
|
||||||
|
|
|
@ -13,16 +13,19 @@ let
|
||||||
id = "0x00158d0002b04f65";
|
id = "0x00158d0002b04f65";
|
||||||
groups = [ "living_room" ];
|
groups = [ "living_room" ];
|
||||||
states.single = "input_boolean.situation_toggle";
|
states.single = "input_boolean.situation_toggle";
|
||||||
|
states.hold = "input_boolean.printer_toggle";
|
||||||
};
|
};
|
||||||
"button_2" = {
|
"button_2" = {
|
||||||
id = "0x00158d0002b04f09";
|
id = "0x00158d0002b04f09";
|
||||||
groups = [ "bed_room" ];
|
groups = [ "bed_room" ];
|
||||||
states.single = "input_boolean.situation_toggle";
|
states.single = "input_boolean.situation_toggle";
|
||||||
|
states.hold = "input_boolean.printer_toggle";
|
||||||
};
|
};
|
||||||
"button_3" = {
|
"button_3" = {
|
||||||
id = "0x00158d0002b00e04";
|
id = "0x00158d0002b00e04";
|
||||||
groups = [ "bed_room" ];
|
groups = [ "bed_room" ];
|
||||||
states.single = "input_boolean.situation_toggle";
|
states.single = "input_boolean.situation_toggle";
|
||||||
|
states.hold = "input_boolean.printer_toggle";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue