Hi, I have created two Automations to toggle the power supply to my kitchen Home Assistant tablet - the aim was to extend the battery life over simply charging 24/7 at 100%. My issue is the automation to switch the smart switch on at 20% works, but bizarrely a similar automation to switch off at 80% doesn’t. Completely stumped and welcome some pointers!
Automation to switch on at 20% (works fine):
alias: Kitchen Tablet On at 20%
description: Kitchen tablet will turn on power switch at 20%
trigger:
- platform: state
entity_id:- sensor.kitchenfirehd_battery_level
to: “20”
from: null
condition: []
action:
- sensor.kitchenfirehd_battery_level
- service: switch.turn_on
entity_id: switch.kitchen_display_tablet_socket - service: notify.mobile_app_rmx3393
data:
message: Home Assistant tablet power switch on as battery is at 20%
title: Home Assistant tablet power switch on
mode: single
Automation to switch off at 80% (doesn’t work):
alias: Kitchen Tablet Off at 80%
description: Kitchen tablet will turn off power switch at 80%
trigger:
- platform: state
entity_id:- sensor.kitchenfirehd_battery_level
to: “80”
condition: []
action:
- sensor.kitchenfirehd_battery_level
- service: switch.turn_off
data: {}
target:
entity_id: switch.kitchen_display_tablet_socket - service: notify.mobile_app_rmx3393
data:
message: Home Assistant tablet power switch off as battery is at 80%
title: Home Assistant tablet power switch off
mode: single
Thank you