Logic Game in HA

Hello everybody!

I bought the “Withing Sleep Analyzer” on Amazon. I managed to integrate it perfectly with Home Assistant, following the official repository (Withings - Home Assistant). My goal was to create an automation that would allow me to turn on some lights at night only when the withing sensor (bed occupancy sensor) was off (ie when I was not in bed); I have, in fact, a motion sensor that automatically turns on the lights of the room if it detects movement in the action area. However, at night I don’t want the lights to go on with every slightest movement in the bed. That’s why I bought the withing sensor.

The problem is that the sensor update period is about 10 sec. This means that from the moment I lie down in bed until Home Assistant actually detects my current position in bed, it takes about 10 seconds. This also means that from the moment I get out of bed to the time Home Assistant notices that, there is a length of time he thinks I’m still in bed. And consequently it does not turn on the night lights. I should, in theory, get out of bed, wait 10 seconds and then walk. And this is obviously a stupid and useless thing!

How could I remedy this situation?

Poor choice of platform? There are plenty of inexpensive and instantaneous bed occupancy sensors.

Yes, I know. However, looking on the internet I only found sensors to build (home-made sensors). And I have neither the skills nor the knowledge. An example is this one: Most Useful Home Automation Sensor? Building a Bed Occupancy Sensor with Home Assistant - YouTube
On Amazon I have not found any type of sensor ready to use that can be integrated with Home Assistant. Asking on reddit and some forums, many people have recommended me to use the Withing product. And here I am!

Yes you do have to indulge in some build-your-own.

You could try adding

update_interval:

to your configuration for withings, but I am not sure how many API calls you are allowed per day.

Unfortunately if I add the update_interval to the Withing configuration, Home Assistant gives me an error during the configuration check.

What is the yaml code and what error does it give?

The Yaml Code is:

withings:
  client_id: "CLIENT_ID"
  client_secret: "CLIENT_SECRET"
  use_webhook: true
  update_interval: 2

Obviously, in the configuration.yaml I wrote the real client_id and client_secret :slight_smile:

The error it gives me is the following one:
“Invalid config for [withings]: [update_interval] is an invalid option for [withings]. Check: withings->withings->update_interval. (See /config/configuration.yaml, line 66).”