linode server steuern, zirkulationspumpe steuern
This commit is contained in:
parent
8e61c164c8
commit
71b44d6a09
|
|
@ -1 +1 @@
|
|||
2023.12.3
|
||||
2024.1.3
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
mode: single
|
||||
id: 28152be7-98e7-4041-b3f1-d775c381f5b4
|
||||
desciption: Zeitsteuerung Poolpumpe
|
||||
alias: Event Poolpumpe schalten
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "21:15:00"
|
||||
id: weekday
|
||||
- platform: time
|
||||
at: "22:30:00"
|
||||
id: weekend
|
||||
condition: []
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: weekday
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
sequence:
|
||||
# - service: switch.turn_on
|
||||
# data: {}
|
||||
# target:
|
||||
# entity_id: switch.your_switch
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: weekend
|
||||
- condition: time
|
||||
weekday:
|
||||
- fri
|
||||
- sat
|
||||
- sun
|
||||
sequence:
|
||||
# - service: switch.turn_on
|
||||
# data: {}
|
||||
# target:
|
||||
# entity_id: switch.your_switch
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
mode: single
|
||||
id: 61dfcad1-b4e2-4b03-afe5-37e08a11466c
|
||||
desciption: Zeitsteuerung Zirkulationspumpe
|
||||
alias: Event Zirkulationspumpe schalten
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "11:00:00"
|
||||
id: stop
|
||||
- platform: time
|
||||
at: "15:00:00"
|
||||
id: start
|
||||
- platform: time
|
||||
at: "22:00:00"
|
||||
id: stop
|
||||
- platform: time
|
||||
at: "05:00:00"
|
||||
id: start
|
||||
condition: []
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: start
|
||||
sequence:
|
||||
- service: notify.dev_telegram
|
||||
data:
|
||||
message: Zirkulation wird gestartet
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: stop
|
||||
sequence:
|
||||
- service: notify.dev_telegram
|
||||
data:
|
||||
message: Zirkulation wird gestoppe
|
||||
|
|
@ -0,0 +1,150 @@
|
|||
blueprint:
|
||||
name: Group Sonos on Motion
|
||||
description: "# Group Sonos on Motion\n**Version: 1.0**\nGroup a Sonos device to
|
||||
a main device when presence (e.g. motion) is detected and the main device is playing
|
||||
music. Can be extended with custom conditions, for example, only group the Sonos
|
||||
when you're not asleep.\nLet us know what you think of this blueprint and for
|
||||
community support including updates: [Click Here](https://community.home-assistant.io/t/sonos-grouping-and-ungrouping-using-motion-detection/575452)\n**The
|
||||
Automation Process:**\n - In this example we will use a motion sensor as the trigger
|
||||
but you can use one or multiple [Binary Sensors](https://www.home-assistant.io/integrations/binary_sensor/)
|
||||
as the trigger/s.\n - Triggers on a motion sensor and adds the Sonos speaker (target)
|
||||
in the room to a group (source).\n - When no motion is detected, a time delay
|
||||
is activated and removes the Sonos player from the group Automatically.\n - The
|
||||
Sonos speaker will remain GROUPED if the motion sensor detects motion before the
|
||||
time delay removes the Sonos speaker from the group. It will then reset the time
|
||||
delay after last motion is detected.\n - You have the option to add \"Custom conditions\".
|
||||
This allows you to extend this blueprint with more advanced YAML syntax.\n - You
|
||||
have the option to set the \"Allow TV\" option. When selected, the target Sonos
|
||||
Speaker will join the group even if the group is playing audio from the TV.\n
|
||||
- You have the option to adjust the \"Time Delay\". This will increase or decrease
|
||||
the amount of time it will take before the target Sonos Speaker will leave the
|
||||
group again.\n"
|
||||
domain: automation
|
||||
input:
|
||||
motion_trigger:
|
||||
name: Trigger Sensor - Binary Sensors *
|
||||
description: The Sensor/s that will make a Sonos speaker join a group. The trigger
|
||||
can be any [Binary Sensors](https://www.home-assistant.io/integrations/binary_sensor/)
|
||||
you like.
|
||||
selector:
|
||||
entity:
|
||||
domain:
|
||||
- binary_sensor
|
||||
multiple: true
|
||||
sonos_source:
|
||||
name: Sonos source
|
||||
description: The sonos player which this player will join. Probably located
|
||||
in a different room.
|
||||
selector:
|
||||
entity:
|
||||
integration: sonos
|
||||
domain:
|
||||
- media_player
|
||||
multiple: false
|
||||
sonos_target:
|
||||
name: Sonos target
|
||||
description: The Sonos player that will be joining the existing group. Probably
|
||||
the player which is located in the room where the motion has been triggered.
|
||||
selector:
|
||||
entity:
|
||||
integration: sonos
|
||||
domain:
|
||||
- media_player
|
||||
multiple: false
|
||||
time_delay:
|
||||
name: Time Delay
|
||||
description: The delay time to leave the sonos player in the group after the
|
||||
last trigger is detected.
|
||||
default: 5
|
||||
selector:
|
||||
number:
|
||||
min: 0.0
|
||||
max: 30.0
|
||||
step: 0.5
|
||||
unit_of_measurement: minutes
|
||||
mode: slider
|
||||
custom_conditions:
|
||||
name: Custom conditions
|
||||
default: []
|
||||
description: A list of custom condititions that also have to be met before grouping
|
||||
the sonos. Only available via YAML mode.
|
||||
allow_tv:
|
||||
name: Allow TV grouping
|
||||
description: Whether to also group the Sonos when the source is playing TV audio.
|
||||
default: false
|
||||
selector:
|
||||
boolean: {}
|
||||
source_url: https://gist.github.com/legovaer/b0211044a36411d8089220687ffda1d8
|
||||
mode: restart
|
||||
max_exceeded: silent
|
||||
variables:
|
||||
motion_trigger: !input motion_trigger
|
||||
sonos_source: !input sonos_source
|
||||
sonos_target: !input sonos_target
|
||||
allow_tv: !input allow_tv
|
||||
time_delay: !input time_delay
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: !input motion_trigger
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
id: t1
|
||||
- platform: state
|
||||
entity_id: !input motion_trigger
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
id: t2
|
||||
- platform: state
|
||||
entity_id: !input sonos_source
|
||||
to: playing
|
||||
id: t3
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
id: t4
|
||||
- platform: event
|
||||
event_type: automation_reloaded
|
||||
id: t5
|
||||
condition:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: !input sonos_source
|
||||
state: playing
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: !input sonos_target
|
||||
state: paused
|
||||
- condition: state
|
||||
entity_id: !input sonos_target
|
||||
state: idle
|
||||
- '{{ sonos_target in state_attr(sonos_source, "group_members") }}'
|
||||
- '{{ allow_tv or state_attr(sonos_source, "source") != "TV" }}'
|
||||
- condition: and
|
||||
conditions: !input custom_conditions
|
||||
action:
|
||||
- choose:
|
||||
- alias: Motion has been detected - group speakers
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: t1
|
||||
sequence:
|
||||
- alias: Add the speaker to the group
|
||||
service: media_player.join
|
||||
data:
|
||||
group_members:
|
||||
- !input sonos_target
|
||||
target:
|
||||
entity_id: !input sonos_source
|
||||
- alias: Motion has no longer been detected - unjoin after delay
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: t2
|
||||
sequence:
|
||||
- alias: Wait the number of minutes set in the time delay
|
||||
delay:
|
||||
minutes: !input time_delay
|
||||
- alias: Unjoin the speaker from the group
|
||||
service: media_player.unjoin
|
||||
target:
|
||||
entity_id: !input sonos_target
|
||||
|
|
@ -11,7 +11,6 @@ default_config:
|
|||
tts:
|
||||
- platform: google_translate
|
||||
|
||||
|
||||
ios: # https://www.justiot.de/smart-home/anleitung-push-nachrichten-mit-home-assistant-unter-ios/
|
||||
|
||||
logger: # https://www.home-assistant.io/integrations/logger/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
# https://www.linode.com/docs/api/linode-instances/#linode-view
|
||||
- platform: rest
|
||||
method: GET
|
||||
name: linode_server1_status
|
||||
resource: https://api.linode.com/v4/linode/instances/53770635/
|
||||
headers:
|
||||
User-Agent: Home Assistant
|
||||
Content-Type: application/json
|
||||
Authorization: !secret rest_headers_secret_linode
|
||||
value_template: "{{ value_json.status }}"
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
# https://www.home-assistant.io/integrations/http/
|
||||
#
|
||||
http:
|
||||
ssl_certificate: /ssl/cert.pem
|
||||
ssl_key: /ssl/privkey.pem
|
||||
# ssl_certificate: /ssl/cert.pem
|
||||
# ssl_key: /ssl/privkey.pem
|
||||
use_x_forwarded_for: true
|
||||
trusted_proxies:
|
||||
- 192.168.178.35
|
||||
- 192.168.178.2
|
||||
- 192.168.178.70
|
||||
- 192.168.178.0/24
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
ip_ban_enabled: false
|
||||
login_attempts_threshold: 100
|
||||
login_attempts_threshold: 5
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
# https://www.home-assistant.io/integrations/rest_command/
|
||||
|
||||
#rest_command: !include ../rest_command.yaml
|
||||
# rest_command split: !include_dir_named ../rest_commands
|
||||
rest_command: !include_dir_merge_named ../rest_commands/
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# https://www.linode.com/docs/api/linode-instances/#linode-shut-down
|
||||
trigger_linode_server1_shutdown:
|
||||
url: "https://api.linode.com/v4/linode/instances/53770635/shutdown"
|
||||
method: POST
|
||||
payload: "{}"
|
||||
content_type: "application/json"
|
||||
verify_ssl: true
|
||||
headers:
|
||||
authorization: !secret rest_headers_secret_linode
|
||||
accept: "application/json, text/html"
|
||||
user-agent: "Home Assistant"
|
||||
|
||||
# https://www.linode.com/docs/api/linode-instances/#linode-boot
|
||||
trigger_linode_server1_boot:
|
||||
url: "https://api.linode.com/v4/linode/instances/53770635/boot"
|
||||
method: POST
|
||||
payload: "{}"
|
||||
content_type: "application/json"
|
||||
verify_ssl: true
|
||||
headers:
|
||||
authorization: !secret rest_headers_secret_linode
|
||||
accept: "application/json, text/html"
|
||||
user-agent: "Home Assistant"
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
|
||||
# Use this file to store secrets like usernames and passwords.
|
||||
# Learn more at https://www.home-assistant.io/docs/configuration/secrets/
|
||||
some_password: welcome
|
||||
|
||||
|
||||
telegram_api_key: 448772521:AAHIIrXBVEUF7_1zYRCmGo5YHipRJyBlp7o
|
||||
telegram_dev: -391668323
|
||||
telegram_chk: 14652347
|
||||
|
|
@ -11,3 +9,5 @@ telegram_homegroup: -192460863
|
|||
|
||||
mqtt_user: mqtt_user
|
||||
mqtt_pw: IH88EZW4mIm9LI8oJWIK
|
||||
|
||||
rest_headers_secret_linode: Bearer db59c00118966bdfaf97aa5661d934d822a5fc94656e1d5be4a8a12bf6f34780
|
||||
|
|
|
|||
Loading…
Reference in New Issue