Hi all –
Stumbling my way through Home Assistant.
I am trying to make a custom sensor that will display a charging icon if my phone is charging and if it is not charging display the icon of phone_battery_level
. I’ve got this so far:
template:
- sensor:
- name: "Phone Battery Custom"
state: >
{% if is_state('binary_sensor.phone_is_charging', 'on') %}
charging
{% endif %}
I know I can add {% else %}
and add more conditions, but how do I return the state of binary_sensor.phone_battery_level
? Much like I have charging if charging is detected?
Am I going about this the wrong way?