Sleep As Android shows no devices but MQTT Explorer sees events

I’ve had sleep tracking working for ages but a week or so ago HA stopped showing events other than ‘Alarm Dismissed’ going back to when it stopped working. Needless to say, the automations don’t work either

I deleted it from HACS and re-installed it without errors, but the devices list does not populate: Integration entries shows ‘No devices or entities’ with the standard SleepAsAndroid/%%%device%%%. Reloading the integration or restarting HA doesn’t help.

If I connect to HA MQTT broker with MQTT Explorer, I can see the SleepAsAndroid topic and the phone firing events when I create test from the automations setting and when I stop and start sleep tracking.

My outdoor temperature sensor is able to use MQTT just fine but it has a mqtt stanza in configuration.yaml

What am I missing please?

Bart…

There is a fix here:

Thanks TVJ, that fixed it. :heart_eyes:

A recap for those stumbling on this page:

  • Open the File editor add-on, VS Code or any other means of editing HA yaml
  • Load /homeassistant/custom_components/sleep_as_android/init.py
  • Search and replace ‘new_state’ to ‘sub_state’
  • Save the file, run some sleep actions and confirm HA sees the MQTT events

Bart…