I just did this so thought I'd share as was having the same issue - and my neopixel light mentioned earlier still required compliance from others
So far it's working like a bomb and had zero trips or alarms
I put the Kettle and toaster on one of these:
(had to buy one of the new type SA plugs for the toaster)
View attachment 1906275
Im already using the
HACS Scheduler Component (creates entities of your schedules EG: 'switch.schedule_3040af) +
HACS Scheduler Card, so I got Claude, to do this for me (after a few iterations of course):
Automation 1 — Kettle/Toaster Inverter Protection (main automation)
When the kettle or toaster draws more than 200W for 2 seconds, it takes a snapshot of every geyser switch and schedule switch that is currently on, turns them all off, then waits inline for the power to drop below 50W for 3 seconds. Once that happens it turns everything back on — except the kitchen geyser switches if it's a bad weather day (This checks Solcast at 06:00 and based on the forecast it allows the Kitchen Geyser schedule to run or not) . If the kettle runs for more than 2 hours without stopping, the automation exits without restoring. Only one instance runs at a time so rapid kettle use doesn't cause conflicts.
Automation 2 — Manual Geyser Protection
If someone manually turns on a geyser while the kettle is actively drawing more than 200W, this automation immediately turns it back off. It distinguishes between a human turning it on (has a user ID) versus the scheduler turning it on automatically (no user ID) and only acts on genuine manual switches. Runs up to 3 instances in parallel in case multiple geysers are turned on simultaneously.
Code:
alias: Kettle/Toaster on, geysers (incl schedules) off & back on when kettle/toaster is off
description: >
Temporarily disables active geyser schedules and manually-on geysers when
the kettle/toaster plug draws power, to prevent inverter overload.
Restores them when it stops. Respects bad weather day flag for kitchen geyser.
mode: single
max_exceeded: silent
trigger:
- platform: numeric_state
entity_id: sensor.kitchen_kettle_toaster_plug_power
above: 200
for:
seconds: 2
id: kettle_on
action:
- variables:
active_switches: >
{% set ns = namespace(active=[]) %}
{% set all_switches = [
'switch.schedule_3040af',
'switch.schedule_5063c9',
'switch.schedule_f2199f',
'switch.schedule_1a1626',
'switch.schedule_10d8ce',
'switch.schedule_0f7b8a',
'switch.schedule_aff782',
'switch.schedule_6b302a',
'switch.schedule_1dc4c2',
'switch.schedule_a44eb0',
'switch.schedule_6d4659',
'switch.schedule_9ea5cf',
'switch.schedule_8a821c',
'switch.schedule_bbf7ee',
'switch.main_geyser',
'switch.mns_geyser',
'switch.kitchen_geyser'
] %}
{% for s in all_switches %}
{% if states(s) == 'on' %}
{% set ns.active = ns.active + [s] %}
{% endif %}
{% endfor %}
{{ ns.active | join(',') }}
- service: system_log.write
data:
message: >
[INVERTER PROTECTION] Kettle/toaster ON
({{ states('sensor.kitchen_kettle_toaster_plug_power') }}W).
Suspending: {{ active_switches if active_switches | length > 0 else 'NONE' }}
level: info
- repeat:
for_each: "{{ active_switches.split(',') | select('ne', '') | list }}"
sequence:
- service: switch.turn_off
target:
entity_id: "{{ repeat.item }}"
- wait_for_trigger:
- platform: numeric_state
entity_id: sensor.kitchen_kettle_toaster_plug_power
below: 50
for:
seconds: 3
timeout:
hours: 2
continue_on_timeout: false
- service: system_log.write
data:
message: >
[INVERTER PROTECTION] Kettle/toaster OFF. Resuming:
{{ active_switches if active_switches | length > 0 else 'NONE' }}
level: info
- repeat:
for_each: "{{ active_switches.split(',') | select('ne', '') | list }}"
sequence:
- if:
- condition: template
value_template: >
{{ repeat.item not in [
'switch.schedule_8a821c',
'switch.schedule_bbf7ee',
'switch.kitchen_geyser'
]
or is_state('input_boolean.bad_weather_day', 'off') }}
then:
- service: system_log.write
data:
message: >
[INVERTER PROTECTION] Resuming: {{ repeat.item }}
level: info
- service: switch.turn_on
target:
entity_id: "{{ repeat.item }}"
else:
- service: system_log.write
data:
message: >
[INVERTER PROTECTION] Skipping {{ repeat.item }}
— bad weather day active.
level: warning
Code:
alias: Manual Geyser On During Kettle Use - Inverter Protection
description: >
If a geyser is manually turned on while the kettle/toaster is running,
turn it back off immediately to prevent inverter overload.
mode: parallel
max: 3
trigger:
- platform: state
entity_id:
- switch.main_geyser
- switch.mns_geyser
- switch.kitchen_geyser
to: "on"
condition:
- condition: numeric_state
entity_id: sensor.kitchen_kettle_toaster_plug_power
above: 200
- condition: template
value_template: >
{{ trigger.to_state.context.user_id is not none }}
action:
- service: system_log.write
data:
message: >
[INVERTER PROTECTION] {{ trigger.entity_id }} manually turned ON
while kettle/toaster is running
({{ states('sensor.kitchen_kettle_toaster_plug_power') }}W).
Turning it back off.
level: warning
- service: switch.turn_off
target:
entity_id: "{{ trigger.entity_id }}"