#Power cycle smart plug when ALPSTUGA air quality monitor has not send data for X amount of time

1 messages · Page 1 of 1 (latest)

pseudo plank
#

Hi everyone, I'm new to HA and was curious if it's possible to toggle a smart plug when the Alpstuga sensor stops working. The sensor works quite well but once in a while it just hangs and I have to power it off and on. I would love to automate this, but I'm unsure on where to start. I read the Automation wiki but it's somewhat overwhelming.

scenic wasp
#
description: ""
mode: single
triggers:
  - trigger: state
    entity_id:
      - sensor.alpstuga_sensor
    for:
      hours: 5
      minutes: 0
      seconds: 0
conditions: []
actions:
  - action: switch.turn_off
    metadata: {}
    target:
      entity_id: switch.alpstuga_plug
    data: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - action: switch.turn_on
    metadata: {}
    target:
      entity_id: switch.alpstuga_plug
    data: {}

pseudo plank
#

You're a real champion! Much appreciated, that gives me more than enough to get started!

vagrant quartz
#

fwiw, have you tried switching to the Matter Server app "beta"? It has some improvements to subscription management and such that might mean you don't even need this automation.

pseudo plank