Skip to content

Instantly share code, notes, and snippets.

@elden1337
Created May 27, 2021 06:45
Show Gist options
  • Save elden1337/98dcb09e7b4eafe27e307c12c354e65f to your computer and use it in GitHub Desktop.
Save elden1337/98dcb09e7b4eafe27e307c12c354e65f to your computer and use it in GitHub Desktop.
Example automation to set chargeamps Halo to activate through ios-notification and Home Assistant (and turn off when charging is done). Added layer of security for owners without the rfid-card needed.
- id: '1234567'
alias: Chargeamps - Charger connected
description: ''
trigger:
- platform: state
entity_id: sensor.chargeamps_phasesocket
from: Available
to: Connected
condition: []
action:
- service: notify.mobile_app_iphone
data:
message: Car charger connected.
title: Chargeamps
data:
push:
category: chargeamps_connected
mode: single
- id: '2345678'
alias: Chargeamps - Activate charger
description: ''
trigger:
- platform: event
event_type: ios.notification_action_fired
event_data:
actionName: TURN_ON_CHARGEAMPS
condition: []
action:
- service: chargeamps.enable
- service: chargeamps.set_light
data:
dimmer: high
mode: single
- id: '3456789'
alias: Chargeamps - Charging done
description: ''
trigger:
- platform: state
entity_id: sensor.chargeamps_phasesocket
from: Charging
to: Connected
condition: []
action:
- service: notify.mobile_app_iphone
data:
message: Car has finished charging. Turning of Chargeamps.
- service: chargeamps.set_light
data:
dimmer: 'off'
- service: chargeamps.disable
ios:
push:
categories:
- name: chargeamps_connected_notification
identifier: 'chargeamps_connected'
actions:
- identifier: 'TURN_ON_CHARGEAMPS'
title: 'Start charging'
activationMode: 'background'
authenticationRequired: false
destructive: no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment