mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 13:23:41 +00:00
Fix automation examples using wrong volatility sensor type
Changed from numeric_state with enum sensor to template using day_volatility_% attribute from binary sensor Co-authored-by: jpawlowski <75446+jpawlowski@users.noreply.github.com>
This commit is contained in:
parent
27049b3757
commit
ace44c453c
1 changed files with 11 additions and 11 deletions
|
|
@ -37,9 +37,9 @@ automation:
|
||||||
to: "on"
|
to: "on"
|
||||||
condition:
|
condition:
|
||||||
# Only act if volatility > 15% (meaningful savings)
|
# Only act if volatility > 15% (meaningful savings)
|
||||||
- condition: numeric_state
|
- condition: template
|
||||||
entity_id: sensor.tibber_home_volatility_today
|
value_template: >
|
||||||
above: 15
|
{{ state_attr('binary_sensor.tibber_home_best_price_period', 'day_volatility_%') | float(0) > 15 }}
|
||||||
# Optional: Ensure dishwasher is idle and door closed
|
# Optional: Ensure dishwasher is idle and door closed
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.dishwasher_door
|
entity_id: binary_sensor.dishwasher_door
|
||||||
|
|
@ -50,7 +50,7 @@ automation:
|
||||||
entity_id: switch.dishwasher_smart_plug
|
entity_id: switch.dishwasher_smart_plug
|
||||||
- service: notify.mobile_app
|
- service: notify.mobile_app
|
||||||
data:
|
data:
|
||||||
message: "Dishwasher started during Best Price period ({{ states('sensor.tibber_home_current_interval_price_ct') }} ct/kWh, volatility {{ states('sensor.tibber_home_volatility_today') }}%)"
|
message: "Dishwasher started during Best Price period ({{ states('sensor.tibber_home_current_interval_price_ct') }} ct/kWh, volatility {{ state_attr('binary_sensor.tibber_home_best_price_period', 'day_volatility_%') }}%)"
|
||||||
```
|
```
|
||||||
|
|
||||||
**Why this works:**
|
**Why this works:**
|
||||||
|
|
@ -116,9 +116,9 @@ automation:
|
||||||
- condition: or
|
- condition: or
|
||||||
conditions:
|
conditions:
|
||||||
# Path 1: High volatility day - trust period classification
|
# Path 1: High volatility day - trust period classification
|
||||||
- condition: numeric_state
|
- condition: template
|
||||||
entity_id: sensor.tibber_home_volatility_today
|
value_template: >
|
||||||
above: 15
|
{{ state_attr('binary_sensor.tibber_home_best_price_period', 'day_volatility_%') | float(0) > 15 }}
|
||||||
# Path 2: Low volatility but price is genuinely cheap
|
# Path 2: Low volatility but price is genuinely cheap
|
||||||
- condition: numeric_state
|
- condition: numeric_state
|
||||||
entity_id: sensor.tibber_home_current_interval_price_ct
|
entity_id: sensor.tibber_home_current_interval_price_ct
|
||||||
|
|
@ -131,7 +131,7 @@ automation:
|
||||||
data:
|
data:
|
||||||
message: >
|
message: >
|
||||||
EV charging started: {{ states('sensor.tibber_home_current_interval_price_ct') }} ct/kWh
|
EV charging started: {{ states('sensor.tibber_home_current_interval_price_ct') }} ct/kWh
|
||||||
(Volatility: {{ states('sensor.tibber_home_volatility_today') }}%)
|
(Volatility: {{ state_attr('binary_sensor.tibber_home_best_price_period', 'day_volatility_%') }}%)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Why this works:**
|
**Why this works:**
|
||||||
|
|
@ -157,9 +157,9 @@ automation:
|
||||||
entity_id: sensor.washing_machine_state
|
entity_id: sensor.washing_machine_state
|
||||||
state: "idle"
|
state: "idle"
|
||||||
# And volatility is meaningful
|
# And volatility is meaningful
|
||||||
- condition: numeric_state
|
- condition: template
|
||||||
entity_id: sensor.tibber_home_volatility_today
|
value_template: >
|
||||||
above: 15
|
{{ state_attr('binary_sensor.tibber_home_best_price_period', 'day_volatility_%') | float(0) > 15 }}
|
||||||
action:
|
action:
|
||||||
- service: button.press
|
- service: button.press
|
||||||
target:
|
target:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue