Force miflora update at specific time

Hi,

Is there a way to automate a miflora sensor update at a specific time?

Here is my current configuration for the sensor:

sensor:
  ...
  - platform: miflora
    mac: 'xxxxxxxxxx'
    name: Flower
    scan_interval: 43200
    monitored_conditions:
      - moisture
      - light
      - temperature
      - conductivity
      - battery

I know there is this scan_interval parameter, but I would like to update the sensor value every morning at 7am. Do you have any idea?

Best regards

I am pretty sure the device broadcasts when it feels like it. I am not sure there is anything you can do to force it.

1 Like

I tried Domoticz before HA and the sensor update had to be scheduled.

my understanding is that you have to poll it for an update. both in the supplied app, and the HA integration.

By default the sensor is only polled once every 20 minutes ( scan_interval is 1200 seconds by default). On a Home Assistant restart sensor will report initial value. If you set median: 3 , it will take at least 40 minutes before the sensor will report an average value. Keep in mind though that reducing polling intervals will have a negative effect on the battery life.

However, it doesn’t look like you can force the out of the box integration to poll at a specific time.

the alternative is to use someething like PlantGateWay - GitHub - ChristianKuehnel/plantgateway: Bluetooth to mqtt gateway for Xiaomi Mi plant sensors - to act as a middle man.

OK I understand, thank you.
About MQTT, I guess the behavior will be the same as it uses the same miflora library.

My goal was to preserve the sensor battery, so updating it every 24 hours seemed a good thing to me. The problem is that the update cycle is started when HA starts, so updating the sensor at a specific time -like every morning at 7am before going to work- was a good option.

Never mind!

the sensor is pretty dumb and will report when polled. If you use plantgateway, you can add a cron to scan whenever you like…