diff --git a/config/lovelace/home_dashboard/00_home.yaml b/config/lovelace/home_dashboard/00_home.yaml index ceb7520..6c87315 100644 --- a/config/lovelace/home_dashboard/00_home.yaml +++ b/config/lovelace/home_dashboard/00_home.yaml @@ -63,6 +63,7 @@ cards: - type: entities show_header_toggle: false entities: + - sensor.randi_cart_availability - binary_sensor.sonos_recoverable # Column 2: Sensors diff --git a/config/packages/sensors/randi.yaml b/config/packages/sensors/randi.yaml index b5eaeb0..ba779f5 100644 --- a/config/packages/sensors/randi.yaml +++ b/config/packages/sensors/randi.yaml @@ -3,17 +3,21 @@ 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 - from: "unknown" + to: "On" action: - service: script.say data: - message: "Hey! Though I should let you know that Randi is available!" + message: "Hey! Thought I should let you know that Randi is available!" +homeassistant: + customize: + sensor.randi_cart_availability: + icon: mdi:cart-outline