diff --git a/config/entity_registry.yaml b/config/entity_registry.yaml index 2bf73656..38d0794f 100644 --- a/config/entity_registry.yaml +++ b/config/entity_registry.yaml @@ -234,3 +234,7 @@ media_player.upstairs_living_room: name: platform: roku unique_id: 1GS3AC111661 +media_player.master_bedroom: + name: + platform: roku + unique_id: 2N006T621680 diff --git a/config/packages/juicenet.yaml b/config/packages/juicenet.yaml index 1d0ddeff..aa41d5bf 100755 --- a/config/packages/juicenet.yaml +++ b/config/packages/juicenet.yaml @@ -13,6 +13,13 @@ homeassistant: juicenet: 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: juicenet: name: JuiceBox Charger @@ -42,6 +49,32 @@ automation: value1: "The Garage charger is now in {{ states('sensor.carlojuice_charging_status') }} mode." 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!' initial_state: 'on' trigger: