Envoyer un SMS avec gammu

Envoi d'un SMS lorsque la lumière du salon s'allume.

configuration.yaml


shell_command:
  send_sms: 'echo "lumiere salon allumee" | gammu sendsms TEXT 0XXXXXXXXX'

automations.yaml

- id: automate
  alias: Envoi SMS
  trigger:
    platform: state
    entity_id: light.salon
    to: 'on'
  action:
    service: shell_command.send_sms

Switch Xiaomi simple clic

Allumer la lumière du salon avec un simple clic d'un switch Xiaomi Aqara.

configuration.yaml : paramétrage de la passerelle Xiaomi


xiaomi_aqara:
  discovery_retry: 10
  gateways:
    - mac: 34:ce:90:92:37:74
      key: i8pivezflud37t93
      host: 192.168.1.2


automations.yaml

- id: automate2
  alias: Switch salon simple
  trigger:
    platform: event
    event_type: click
    event_data:
      entity_id: binary_sensor.switch_158d5552c611ae
      click_type: single
  action:
    service: light.turn_on
    entity_id: light.salon

Switch Xiaomi double clic

Allumer les lumières de la TV avec un double clic d'un switch Xioami Aqara.

automations.yaml

- id: automate3
  alias: Switch salon double
  condition:
  - condition: state
    entity_id: light.tv
    state: 'off'
  trigger:
    platform: event
    event_type: click
    event_data:
      entity_id: binary_sensor.switch_158d5552c611ae
      click_type: double
  action:
    service: light.turn_on
    entity_id: light.tv

To be continued....