Hallo.
Ist es irgendwie möglich über eine Automation / Dienste (z.B. bei betreten einer Zone) das Handy stumm zu schalten?
Einen Sensor sensor.galaxy_s21_ringer_mode ist vorhanden. Oder müsste so etwas über scripte realisiert werden??
Den Code habe ich von der Seite von @maxe kopiert und in eine Automation gepackt.
Gerade habe ich die Automation etwas vereinfacht und konnte erfolgreich abspeichern.
Ich habe allerdings nichts an den service:-Teil geändert. Merkwürdig.
Allerdings funktioniert es so und kann damit weiterarbeiten:
alias: Test Handy Lautstärke einstellen
description: ""
trigger:
- platform: state
entity_id:
- input_boolean.testschalter
to: "on"
id: an
- platform: state
entity_id:
- input_boolean.testschalter
to: "off"
id: aus
condition: []
action:
- if:
- condition: trigger
id:
- an
then:
- service: notify.mobile_app_galaxy_s21
data:
message: command_ringer_mode
data:
command: normal
- if:
- condition: trigger
id:
- aus
then:
- service: notify.mobile_app_galaxy_s21
data:
message: command_ringer_mode
data:
command: vibrate
mode: single