mysmarthome/packages/gearbest.yaml

34 lines
1.5 KiB
YAML
Executable File

# sensor:
# - platform: gearbest
# currency: USD
# items:
# - url: https://www.gearbest.com/alarm-systems/pp_659226.html
# name: Xiaomi Aqara Human Body Sensor
# - url: https://www.gearbest.com/access-control/pp_626702.html
# name: Xiaomi Aqara Temperature Humidity Sensor
# - url: https://www.gearbest.com/living-appliances/pp_364494.html
# name: xiaomi cube
# automation:
# - alias: Alert Low Price of Cube
# initial_state: true
# trigger:
# - platform: template
# value_template: '{{ states.sensor.xiaomi_cube.state | int < 10 }}'
# - platform: template
# value_template: '{{ states.sensor.xiaomi_aqara_human_body_sensor.state | int < 10 }}'
# - platform: template
# value_template: '{{ states.sensor.xiaomi_aqara_temperature_humidity_sensor.state | int < 10 }}'
# action:
# - service: script.notify_me
# data_template:
# message: >
# {% if states.sensor.xiaomi_aqara_human_body_sensor.state | int < 10 %}
# Xiaomi Aqara Motion Sensor is on sale, it is less than $10.... care to buy?
# {% endif %}
# {% if states.sensor.xiaomi_cube.state | int < 11 %}
# Xiaomi Cube is on sale, it is less than $11... buy one?
# {% endif %}
# {% if states.sensor.xiaomi_aqara_temperature_humidity_sensor.state | int < 7 %}
# Xiaomi Temp & Humidity Sensor is on sale for less than $7. Time to buy!
# {% endif %}