Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95462

Automation issues with sensor.xiaomi_lywsdcgq and ESP32 ESPHome

$
0
0

@MarkB1 wrote:

Hi,

On the whole the sensor works fine for control but issues arise with it in Automation.

Because the sensor looses connectivity once in a while due to the ESP32 on ESPhome the sensor reading reports Unavailable.

This in turn triggers my automation to return back a notification as Unavailable even though I have a delay set for 20 seconds.

Is there something I could add to my template so if sensor is unavailable it does not trigger the automation?

- id: '1576494984622'
  alias: HOUSE TEMPERATURE OUTSIDE LIMITS NOTIFICATION
  description: ''
  trigger:
  - for: 00:00:20
    platform: template
    value_template: '{{states.sensor.xiaomi_lywsdcgq_temperature.state | float < 16.00
      or states.sensor.xiaomi_lywsdcgq_temperature.state | float > 22.50}}'
  condition: []
  action:
  - data_template:
      message: HEATING CONTROL FAILURE {{ states.sensor.xiaomi_lywsdcgq_temperature.state
        }} °C
    service: persistent_notification.create
  - data_template:
      message: HEATING CONTROL FAILURE {{ states.sensor.xiaomi_lywsdcgq_temperature.state
        }} °C
    service: notify.mobile_app_sm_g960f

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95462

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>