2018-01-02 00:00:45 +00:00
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Neato Support for D7 Connected Botvac - control my [Neato Vacuum](http://amzn.to/2kqnnqu) with Home Assistant.
#-------------------------------------------
homeassistant :
customize_glob :
"*.carlojuice*" :
homebridge_hidden : True
hidden : False
#-------------------------------------------
juicenet :
access_token : !secret juicenet_access_token
2018-06-04 19:03:33 +00:00
switch :
- platform : command_line
switches :
juicebox_restart :
command_on : "/usr/bin/curl -k 'http://192.168.10.175/command/reboot'"
friendly_name : Restart Juicebox
2018-01-02 00:00:45 +00:00
group :
juicenet :
name : JuiceBox Charger
control : hidden
entities :
- sensor.carlojuice_amps
- sensor.carlojuice_charge_time
- sensor.carlojuice_charging_status
- sensor.carlojuice_energy_added
- sensor.carlojuice_temperature
- sensor.carlojuice_voltage
- sensor.carlojuice_watts
2018-06-06 22:15:38 +00:00
- switch.juicebox_restart
2018-01-02 00:00:45 +00:00
#############################################################################
### Automations - Alerts related to the JuiceBox (http://amzn.to/2AZVQ37)
##############################################################################
automation :
- alias : 'Car Charging Alerts'
initial_state : 'on'
trigger :
- platform : state
entity_id : sensor.carlojuice_charging_status
action :
- service : script.notify_engine
data_template :
value1 : "The Garage charger is now in {{ states('sensor.carlojuice_charging_status') }} mode."
2018-07-21 21:20:23 +00:00
who : 'carlo'
2018-01-02 00:00:45 +00:00
2018-06-04 19:03:33 +00:00
- alias : 'Juicebox Self-Heal'
initial_state : 'on'
trigger :
- platform : state
entity_id : sensor.carlojuice_charging_status
to : 'disconnect'
2018-06-04 19:35:25 +00:00
for :
2018-06-29 20:11:03 +00:00
minutes : 6
- platform : time
2018-06-29 20:51:56 +00:00
hours : '/4'
2018-06-29 20:11:03 +00:00
minutes : 30
seconds : 30
2018-06-04 19:35:25 +00:00
condition :
2018-06-29 20:11:03 +00:00
- condition : state
entity_id : sensor.carlojuice_charging_status
state : 'disconnect'
for :
minutes : 5
2018-06-04 19:35:25 +00:00
- condition : template
value_template : >
{%- if states.automation.juicebox_selfheal.attributes.last_triggered -%}
2018-06-29 20:51:56 +00:00
{{ (as_timestamp(now()) - as_timestamp(states.automation.juicebox_selfheal.attributes.last_triggered)) > 10000 }}
2018-06-04 19:35:25 +00:00
{%- else -%}
true
{%- endif -%}
2018-06-04 19:03:33 +00:00
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!"
2018-06-06 22:15:38 +00:00
] | random + " (https://www.vcloudinfo.com/2018/06/using-home-assistant-to-fix-my-juicebox.html) #SelfHeal #EV #BoltEV "}}
2018-06-04 19:03:33 +00:00
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 }}
2018-01-02 00:00:45 +00:00
- alias : 'JuiceBox AMP Alert!'
initial_state : 'on'
trigger :
- platform : numeric_state
entity_id : sensor.carlojuice_amps
2018-01-07 01:26:30 +00:00
above : 24
for :
minutes : 2
2018-01-02 00:00:45 +00:00
action :
- service : input_boolean.turn_on
entity_id : input_boolean.alert_mode
- service : script.notify_engine
data_template :
value1 : "The Juice Box Charger is pulling {{ states('sensor.carlojuice_amps') }} AMPs. This is above the safety mark of 30. Please unplug charger immediately."
who : 'parents'
- service : script.speech_engine
data_template :
value1 : "The Juice Box Charger is pulling {{ states('sensor.carlojuice_amps') }} AMPs. This is above the safety mark of 30. Please unplug charger immediately."
- alias : 'JuiceBox Tweet Stat!'
initial_state : 'on'
trigger :
- platform : state
entity_id : sensor.carlojuice_charging_status
from : 'charging'
action :
2018-06-14 19:33:39 +00:00
- delay : '0{{ range(0,3) | random | int }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
2018-03-18 01:14:50 +00:00
- service : script.tweet_engine_image
2018-01-02 00:00:45 +00:00
data_template :
tweet : >
{{ [
2018-01-11 20:11:52 +00:00
"The #Chevy Bolt Charged for {{(states.sensor.carlojuice_charge_time.state | int /60) | round() }} minutes and Juiced up {{states.sensor.carlojuice_energy_added.state |int /1000}} KwHs." ,
2018-01-02 00:00:45 +00:00
"The last charging session was {{(states.sensor.carlojuice_charge_time.state | int /60) | round() }} minutes. Added {{states.sensor.carlojuice_energy_added.state |int /1000}} KwHs " ,
2018-01-07 15:35:32 +00:00
"The Juice Box Pro added {{states.sensor.carlojuice_energy_added.state |int /1000}} KwHs to the #Chevy #BoltEV in {{(states.sensor.carlojuice_charge_time.state | int /60) | round() }} minutes."
2018-03-17 18:39:26 +00:00
] | random + " (https://github.com/CCOSTAN/Home-AssistantConfig#garage) #Electric #Solar"}}
image : >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/car.png" ,
2018-03-17 19:18:30 +00:00
"/config/www/custom_ui/floorplan/images/branding/bear_stone_car.png" ,
2018-03-18 00:49:16 +00:00
"/config/www/custom_ui/floorplan/images/branding/batteries.png" ,
2018-03-18 01:14:50 +00:00
"/config/www/custom_ui/floorplan/images/branding/charge.png"
2018-03-17 18:39:26 +00:00
] | random }}