Created
January 18, 2020 23:53
-
-
Save mcowger/dc4d216eb3baf8a6329b1c0cac7b63c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- id: '1579390245541' | |
alias: Emergency Charge | |
description: Charge the tesla when it comes home in the middle of the day to 40% | |
trigger: | |
- entity_id: binary_sensor.toothless_charger_sensor | |
for: 00:30:00 | |
from: 'off' | |
platform: state | |
to: 'on' | |
condition: | |
- after: 00:06:00 | |
before: 00:18:00 | |
condition: time | |
- below: '30' | |
condition: numeric_state | |
entity_id: sensor.toothless_battery_sensor | |
- condition: state | |
entity_id: binary_sensor.toothless_charger_sensor | |
state: 'on' | |
action: | |
- alias: '' | |
data: {} | |
entity_id: switch.toothless_charger_switch | |
service: switch.turn_on | |
- wait_template: '{{states.sensor.toothless_battery_sensor.state | int > 40}}' | |
- entity_id: switch.toothless_charger_switch | |
service: switch.turn_off |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment