diff --git a/configs/pepe/home-assistant.nix b/configs/pepe/home-assistant.nix index 38265e6..bf36430 100644 --- a/configs/pepe/home-assistant.nix +++ b/configs/pepe/home-assistant.nix @@ -61,9 +61,22 @@ in { options = [ "default" "night" ]; }; input_boolean.situation_toggle.icon = "mdi:toggle-switch"; + input_boolean.printer_toggle.icon = "mdi:toggle-switch"; 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"; trigger = { @@ -80,6 +93,7 @@ in { }; } + # control situation with buttons { alias = "Button -> Change Scene"; diff --git a/configs/pepe/home-assistant/zigbee2mqtt/buttons.nix b/configs/pepe/home-assistant/zigbee2mqtt/buttons.nix index fb24cb9..28306ae 100644 --- a/configs/pepe/home-assistant/zigbee2mqtt/buttons.nix +++ b/configs/pepe/home-assistant/zigbee2mqtt/buttons.nix @@ -13,16 +13,19 @@ let id = "0x00158d0002b04f65"; groups = [ "living_room" ]; states.single = "input_boolean.situation_toggle"; + states.hold = "input_boolean.printer_toggle"; }; "button_2" = { id = "0x00158d0002b04f09"; groups = [ "bed_room" ]; states.single = "input_boolean.situation_toggle"; + states.hold = "input_boolean.printer_toggle"; }; "button_3" = { id = "0x00158d0002b00e04"; groups = [ "bed_room" ]; states.single = "input_boolean.situation_toggle"; + states.hold = "input_boolean.printer_toggle"; }; };