Hey guys,
I’m currently developing an automation that alerts me when my car is connected for charging. My intention is, to receive a notification if I’m parked at a charging station for more than 4 hours, so I can avoid incurring additional fees. HA should trigger a IOS Shortcut which setups a timer.
alias: e-Auto Laden - Blockiergebühr
description: ""
trigger:
- platform: state
entity_id:
- sensor.id_4_pro_performance_150_kw_204_ps_remaining_charging_time
condition:
- condition: template
value_template: >-
{{ not
is_state('sensor.id_4_pro_performance_150_kw_204_ps_remaining_charging_time',
'unavailable') }}
action:
- service: notify.mobile_app_iphone_von_daniel
data:
message: Trigger a Shortcut!
data:
shortcut:
name: Test23
input: "{{ states('sensor.id_4_pro_performance_150_kw_204_ps_remaining_charging_time') }}"
mode: single
My actual problem is that IOS Shortcuts is only accepting strings, thatswhy i tried to send my sensor value as string. But that doesn’t work.
I tried it also in that following way with no success:
alias: e-Auto Laden - Blockiergebühr
description: ""
trigger:
- platform: state
entity_id:
- sensor.id_4_pro_performance_150_kw_204_ps_remaining_charging_time
condition:
- condition: template
value_template: >-
{{ not
is_state('sensor.id_4_pro_performance_150_kw_204_ps_remaining_charging_time',
'unavailable') }}
action:
- service: input_text.set_value
target:
entity_id: input_text.test
data:
value: >-
{{states('sensor.id_4_pro_performance_150_kw_204_ps_remaining_charging_time')}}
- service: notify.mobile_app_iphone_von_daniel
data:
message: Trigger a Shortcut!
data:
shortcut:
name: Test23
input: "{{states('input_text.test')}}"
mode: single
HA sends the notification successfully but is not triggering my shortcut except if i type the input variable value manually like “210” or let it completly away.
Anyone a idea how i could get that fixed?
Greetings
Dany