#-----Lovelace Card-----
type: custom:stack-in-card
mode: vertical
title: Fiat 500e
cards:
- type: map
entities:
- entity: sensor.fiat_map
title: Fiat 500e Location
- type: entities
entities:
- entity: sensor.range_m
name: Range
icon: mdi:map-marker-distance
- type: custom:battery-state-entity #see https://github.com/maxwroc/battery-state-card
entity: sensor.soc
icon: mdi:battery
name: State of Charge
- entity: script.1649176278340 #HA's inexplicably assigned name
name: ' '
secondary_info:
entity: sensor.fiat_charging_status
- entity: lock.fiat_lock
name: ' '
secondary_info:
entity: sensor.fiat_lock_status
- entity: sensor.location_spd_m0
name: Speed
icon: mdi:speedometer
- entity: sensor.odo_m
name: Odometer
icon: mdi:counter
- entity: sensor.batt_12v_per2
name: 12 V Battery
icon: mdi:car-battery
- entity: sensor.vehicle_ambient_temp
name: Temperature
state_color: true
- type: button
show_name: false
show_icon: true
tap_action:
action: call-service
service: script.update_fiat_stats
service_data: {}
target: {}
entity: script.update_fiat_stats
name: Update
icon_height: 30px
#-----configuration.yaml-----
rest_command:
fiat_lock:
url: https://xxxxxxxxxxxx #Get URL from my500e
method: POST
headers:
Content-Type: application/x-www-form-urlencoded
payload: 'jsonCMD={"APIuser":"xxxxxxxx","APIpw":"xxxxxxxxxxxxxxxxxxxxxx","VIN":"3C3xxxxxxxxxxxxxx","Cmd":"senddoor","Param":"DL"}' #supply user, pw, VIN
fiat_unlock:
url: https:// xxxxxxxxxxxx #Get URL from my500e
method: POST
headers:
Content-Type: application/x-www-form-urlencoded
payload: 'jsonCMD={"APIuser"::"xxxxxxxx","APIpw":"xxxxxxxxxxxxxxxxxxxxxx","VIN":"3C3xxxxxxxxxxxxxx","Cmd":"senddoor","Param":"UL1234"}' #supply user, pw, VIN
fiat_charge:
url: https:// xxxxxxxxxxxx #Get URL from my500e
method: POST
headers:
Content-Type: application/x-www-form-urlencoded
payload: 'jsonCMD={"APIuser"::"xxxxxxxx","APIpw":"xxxxxxxxxxxxxxxxxxxxxx","VIN":"3C3xxxxxxxxxxxxxx","Cmd":"sendextra","Param":"chargenow"}' #supply user, pw, VIN
lock:
- platform: template
name: Fiat Lock
value_template: "{{ is_state('sensor.door_lock_status', '1') }}"
lock:
service: script.lock_fiat
unlock:
service: script.1649125768563 #for some reason HA gave this script numeric ID rather than assigned name
#-----Scripts-----
alias: Chargenow Fiat #HA inexplicably named it script.1649176278340
sequence:
- service: rest_command.fiat_charge
data: {}
- delay:
hours: 0
minutes: 0
seconds: 4
milliseconds: 0
- service: script.update_fiat_stats
data: {}
mode: single
icon: mdi:lightning-bolt-circle
alias: Lock Fiat
sequence:
- service: rest_command.fiat_lock
data: {}
- delay:
hours: 0
minutes: 0
seconds: 4
milliseconds: 0
- service: script.update_fiat_stats
data: {}
mode: single
icon: mdi:lock
alias: Unlock Fiat #HA inexplicably named it script.1649125768563
sequence:
- service: rest_command.fiat_unlock
data: {}
- delay:
hours: 0
minutes: 0
seconds: 4
milliseconds: 0
- service: script.update_fiat_stats
data: {}
mode: single
icon: mdi:lock-open