My Osram On/Off plug doesn't work in thermostat-like automations; neither via Trigger:State Change nor via HAs' generic Thermostat platform

It can’t be toggled consistently via a thermostat-like automation. After I configured it, it didn’t react at all, then, it worked for a couple of hours at night and now it doesn’t work again.

I tried different methods of setting it up and rebooted my Raspberry after each one.First, I tried Trigger: Numeric State but after someone pointed me to that causing issues with temperature sensors in HA, I tried a state trigger (without specifying anything) with Action:Choose->Option1: Temperature > 22.5° and Option 2 Temperature < 22.5°:

  - platform: state
    entity_id: sensor.dusche_temperatur
  - condition: numeric_state
    entity_id: sensor.dungeon_realfeel_temperature
    below: '26'
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: sensor.dusche_temperatur
            below: '22.5'
          - type: turn_on
            device_id: 718725c23bc84639afbeac1b04e61c3f
            entity_id: light.on_off_plug_1
            domain: light
      - conditions:
          - condition: numeric_state
            entity_id: sensor.dusche_temperatur
            above: '22.5'
          - type: turn_off
            device_id: 718725c23bc84639afbeac1b04e61c3f
            entity_id: light.on_off_plug_1
            domain: light
    default: []
mode: single

Note that light.on_off_plug_1 is the Osram On/Off plug
But since that didn’t work either I tried HAs’ Generic Thermostat platform by putting this into my config.yaml:

  - platform: generic_thermostat
    name: Bad Thermostat
    heater: light.on_off_plug_1
    target_sensor: sensor.dusche_temperatur
    target_temp: 22.5
      minutes: 5 #tried it with and without this variable, but it didn't make a difference, not on seconds: 1 either

That one didn’t work at all, though.

I’m using the Osram On/Off Plug in conjunction with the Philips Hue Motion/Temperature/Light Sensor. The latter does report temperature changes in Homeassistant regularly and correctly and btw, doing solely motion-based On/Off-Plug-toggle-automations with those 2 devices has worked flawlessly so far.

(don't know if the colllapsed content is part of the issue)

An odd thing about the latter is that the Philips Hue app says it’s not reachable but toggling it from there or Lovelace does work.

Since that ‘not reachable’ notification looked suspicious, I tried applying some troubleshooting suggestions I found online on that:

  • I replugged the thing from the outlet, didn’t help though.

  • Tried toggling the plugs’ pairing-mode and search-new-lamp in the Philips Hue app but it didn’t got detected. I then tried deleting the plug from the Hue app and did a successful re-pair. But that only showed the plug as available for a short while while it was on and more importantly, it still didn’t get triggered by HAs’ thermostat platform.

I’ve also tried to check if maybe the issue is that the Osram plug is in the light domain rather than in the switch domain so I changed it via a template in my config.yaml but that was of no use.

Not sure what’s the matter here

I’ve set
keep_alive: to minutes: 3 and clicked on the flame-icon in the thermostat Lovelace card. It’s working for now. Hope it stays so.