#370 - Added new switch to restart and also new automation to SelfHeal the Juicebox.

This commit is contained in:
ccostan 2018-06-04 15:03:33 -04:00
parent 00fbb8d4d6
commit ab65d38ac0
2 changed files with 37 additions and 0 deletions

View File

@ -234,3 +234,7 @@ media_player.upstairs_living_room:
name: name:
platform: roku platform: roku
unique_id: 1GS3AC111661 unique_id: 1GS3AC111661
media_player.master_bedroom:
name:
platform: roku
unique_id: 2N006T621680

View File

@ -13,6 +13,13 @@ homeassistant:
juicenet: juicenet:
access_token: !secret juicenet_access_token access_token: !secret juicenet_access_token
switch:
- platform: command_line
switches:
juicebox_restart:
command_on: "/usr/bin/curl -k 'http://192.168.10.175/command/reboot'"
friendly_name: Restart Juicebox
group: group:
juicenet: juicenet:
name: JuiceBox Charger name: JuiceBox Charger
@ -42,6 +49,32 @@ automation:
value1: "The Garage charger is now in {{ states('sensor.carlojuice_charging_status') }} mode." value1: "The Garage charger is now in {{ states('sensor.carlojuice_charging_status') }} mode."
who: 'parents' who: 'parents'
- alias: 'Juicebox Self-Heal'
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.carlojuice_charging_status
to: 'disconnect'
action:
- service: homeassistant.turn_on
entity_id: switch.juicebox_restart
- service: script.tweet_engine_image
data_template:
tweet: >
{{ [
"The #JuiceBox Pro had to be restarted. It was unable to connect back to @emotorwerks servers.",
"Unfortunately, the Juicebox Pro sometimes can no longer connect to @emotorwerks servers. Fortunately, #HomeAssistant can fix that with a restart!"
] | random + " (https://github.com/CCOSTAN/Home-AssistantConfig#garage) #SelfHeal #EV #BoltEV s"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/car.png",
"/config/www/custom_ui/floorplan/images/branding/bear_stone_car.png",
"/config/www/custom_ui/floorplan/images/branding/batteries.png",
"/config/www/custom_ui/floorplan/images/branding/charge.png"
] | random }}
- alias: 'JuiceBox AMP Alert!' - alias: 'JuiceBox AMP Alert!'
initial_state: 'on' initial_state: 'on'
trigger: trigger: