mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-07 17:34:42 +00:00
24 lines
660 B
YAML
24 lines
660 B
YAML
# https://www.home-assistant.io/integrations/scrape
|
|
sensor:
|
|
- platform: scrape
|
|
resource: https://randi.bg
|
|
select: ".default-cart-wrapper #cart-total"
|
|
value_template: "{{ 'on' if value.find('продукт') > -1 else 'off' }}"
|
|
name: Randi cart availability
|
|
|
|
automation:
|
|
- alias: Randi · Notify cart is available
|
|
trigger:
|
|
platform: state
|
|
entity_id: sensor.randi_cart_availability
|
|
to: "On"
|
|
action:
|
|
- service: script.say
|
|
data:
|
|
message: "Hey! Thought I should let you know that Randi is available!"
|
|
|
|
homeassistant:
|
|
customize:
|
|
sensor.randi_cart_availability:
|
|
icon: mdi:cart-outline
|