lacrima08

is phone charging

Jan 5th, 2024
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. - binary_sensor:
  2. - name: "is Phone Charging" #Possible de renommer le nom du sensor ici
  3. unique_id: dd73cf95-638a-455f-b5ae-0e21b1dd8950
  4. device_class: battery_charging
  5. state: >
  6. {% if is_state('sensor.xiaomi_mi_11t_pro_battery_state', 'charging') %}
  7. on
  8. {% else %}
  9. off
  10. {% endif %}
  11.  
  12. # remplacer "sensor.xiaomi_mi_11t_pro_battery_state"
  13. #par l'entité correspondante au battery state de ton téléphone
Advertisement
Add Comment
Please, Sign In to add comment