From 3813ace16667c2a58d0457d41d3a5f1937d5f354 Mon Sep 17 00:00:00 2001 From: oster Date: Fri, 20 Dec 2024 22:21:28 +0000 Subject: [PATCH] start/stop mini pc --- homeassistant/automations.yaml | 186 +++++++++++++++++++++++++++--- homeassistant/configuration.yaml | 9 ++ homeassistant/shell_commands.yaml | 1 + 3 files changed, 181 insertions(+), 15 deletions(-) create mode 100644 homeassistant/shell_commands.yaml diff --git a/homeassistant/automations.yaml b/homeassistant/automations.yaml index 3e064bc..171e1bf 100644 --- a/homeassistant/automations.yaml +++ b/homeassistant/automations.yaml @@ -118,32 +118,38 @@ - id: '1725182808963' alias: Flurlampe an description: '' - trigger: - - platform: sun - event: sunset + triggers: + - event: sunset offset: 0 - condition: [] - action: + trigger: sun + - trigger: time + at: 06:30:00 + conditions: [] + actions: - action: light.turn_on metadata: {} data: - brightness_pct: 60 + brightness_pct: 90 target: - device_id: 31458ee6ea6b3cae1015375c243efffb + device_id: + - da8053e3c99c43fa802f32627d9ec42e mode: single - id: '1725182915207' alias: Flurlampe aus description: '' - trigger: - - platform: time - at: 01:00:00 - condition: [] - action: + triggers: + - at: 01:00:00 + trigger: time + - trigger: time + at: 08:15:00 + conditions: [] + actions: - action: light.turn_off metadata: {} data: {} target: - device_id: 31458ee6ea6b3cae1015375c243efffb + device_id: + - da8053e3c99c43fa802f32627d9ec42e mode: single - id: '1732045729333' alias: Wasser Spüle @@ -251,8 +257,8 @@ conditions: [] actions: - type: toggle - device_id: aa992894922dfd99d4de351691fddbeb - entity_id: c9e060ed610aaa859483ed162741f6b8 + device_id: 0477c12763b17a6f8e00e457e2241c65 + entity_id: 47503c95c474e4f8bfba5f00c725a1d4 domain: light mode: single - id: '1733523711057' @@ -297,3 +303,153 @@ target: device_id: aa992894922dfd99d4de351691fddbeb mode: single +- id: '1733558486213' + alias: Küche Theke und Tisch aus + description: '' + triggers: + - device_id: f9bd33dde8040b0c80b8ef35f0eff174 + domain: shelly + type: single_push + subtype: button1 + trigger: device + conditions: + - condition: device + type: is_on + device_id: a09f77bde7ba5098df0c3ec599ca7377 + entity_id: 2a315e13dac7a4d0e3a5331216e79a5b + domain: switch + actions: + - action: light.turn_off + metadata: {} + data: {} + target: + device_id: + - 0477c12763b17a6f8e00e457e2241c65 + - type: turn_off + device_id: a09f77bde7ba5098df0c3ec599ca7377 + entity_id: 2a315e13dac7a4d0e3a5331216e79a5b + domain: switch + mode: single +- id: '1733558619917' + alias: Küche Theke und Tisch an + description: '' + triggers: + - device_id: f9bd33dde8040b0c80b8ef35f0eff174 + domain: shelly + type: single_push + subtype: button1 + trigger: device + conditions: + - condition: device + type: is_off + device_id: a09f77bde7ba5098df0c3ec599ca7377 + entity_id: 2a315e13dac7a4d0e3a5331216e79a5b + domain: switch + actions: + - action: light.turn_on + metadata: {} + data: {} + target: + device_id: 0477c12763b17a6f8e00e457e2241c65 + - type: turn_on + device_id: a09f77bde7ba5098df0c3ec599ca7377 + entity_id: 2a315e13dac7a4d0e3a5331216e79a5b + domain: switch + mode: single +- id: '1733861633781' + alias: Fernbedienung wieder hell + description: '' + triggers: + - domain: mqtt + device_id: 7ee7af674fef326af8b7d7f20d1d00d6 + type: action + subtype: color_temperature_move + trigger: device + conditions: + - condition: state + entity_id: light.kuchentisch + state: 'off' + actions: + - action: scene.turn_on + metadata: {} + data: {} + target: + entity_id: + - scene.maximales_licht + mode: single +- id: '1733861763897' + alias: Fernbedienung abdunkeln + description: '' + triggers: + - domain: mqtt + device_id: 7ee7af674fef326af8b7d7f20d1d00d6 + type: action + subtype: color_temperature_move + trigger: device + conditions: + - condition: device + type: is_on + device_id: 0477c12763b17a6f8e00e457e2241c65 + entity_id: 47503c95c474e4f8bfba5f00c725a1d4 + domain: light + actions: + - action: scene.turn_on + metadata: {} + data: {} + target: + entity_id: scene.hanna_schlafmodus + mode: single +- id: '1733862634974' + alias: Küche Wohnzimmer an + description: '' + triggers: + - domain: mqtt + device_id: ece48086d0eb3844ccba5f333ee59ceb + type: action + subtype: 'on' + trigger: device + conditions: [] + actions: + - action: light.turn_on + metadata: {} + data: {} + target: + area_id: + - wohnzimmer + - kuche + - type: turn_on + device_id: a09f77bde7ba5098df0c3ec599ca7377 + entity_id: 2a315e13dac7a4d0e3a5331216e79a5b + domain: switch + - type: turn_on + device_id: 1c7100c71320f1603884443c7fd2092d + entity_id: 276285d3b1143417515620cef9615128 + domain: switch + mode: single +- id: '1733862691860' + alias: Küche Wohnzimmer aus + description: '' + triggers: + - domain: mqtt + device_id: ece48086d0eb3844ccba5f333ee59ceb + type: action + subtype: 'off' + trigger: device + conditions: [] + actions: + - action: light.turn_off + metadata: {} + data: {} + target: + area_id: + - kuche + - wohnzimmer + - type: turn_off + device_id: a09f77bde7ba5098df0c3ec599ca7377 + entity_id: 2a315e13dac7a4d0e3a5331216e79a5b + domain: switch + - type: turn_off + device_id: 1c7100c71320f1603884443c7fd2092d + entity_id: 276285d3b1143417515620cef9615128 + domain: switch + mode: single diff --git a/homeassistant/configuration.yaml b/homeassistant/configuration.yaml index 955fbe1..a5566a8 100644 --- a/homeassistant/configuration.yaml +++ b/homeassistant/configuration.yaml @@ -9,6 +9,15 @@ group: !include groups.yaml automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml +shell_command: !include shell_commands.yaml + +switch: + - platform: wake_on_lan + name: RemotePC + host: 192.168.178.87 + mac: 58:47:ca:78:4e:59 + turn_off: + service: shell_command.turn_off_remote_pc #MQTT Broker for milight hub: diff --git a/homeassistant/shell_commands.yaml b/homeassistant/shell_commands.yaml new file mode 100644 index 0000000..9fcb787 --- /dev/null +++ b/homeassistant/shell_commands.yaml @@ -0,0 +1 @@ +turn_off_remote_pc: "ssh -i /config/ssh_keys/id_rsa_homeassistant -o 'StrictHostKeyChecking=no' homeassistant@mini sudo shutdown -h now"