core: miflora sensors reported as 'Unavailable'.
Home Assistant release with the issue:
0.103.4
Last working Home Assistant release (if known): 0.102
Operating environment (Hass.io/Docker/Windows/etc.):
raspbian/virtualenv on pi4 python_version 3.7.3
Integration:
https://www.home-assistant.io/integrations/miflora/
Description of problem: Since https://github.com/home-assistant/home-assistant/pull/29276, miflora sensors are now displayed as ‘Unavailable’ when they can’t be reached. Since BtLE is quite unreliable, even with a good connection they are frequently displayed as ‘Unavailable’.
As values tend to change slowly, a day-old stale value is preferable to ‘Unavailable’.
All six of my devices are within 4m of the pi4 which runs home-assistant. Even the closest devices have gaps in the graphs where they are ‘Unavailable’.
Problem-relevant configuration.yaml
entries and (fill out even if it seems unimportant):
Traceback (if applicable):
Additional information:
Suggestion: Allow users to set a threshold after which the sensor is considered ‘Unavailable’. Only mark the sensor ‘Unavailable’ if the user has configured a threshold.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 86 (26 by maintainers)
Can we await confirmation of the fix before closing the issue please?
Ups, yes platform should be miflora ` sensor:
# https://home-assistant.io/components/plant/ plant: Palme: sensors: moisture: sensor.palme_moisture battery: sensor.palme_battery temperature: sensor.palme_temperature conductivity: sensor.palme_conductivity brightness: sensor.palme_brightness min_moisture: 20 max_moisture: 55 min_battery: 10 min_conductivity: 100 min_temperature: 11
i don t know why but i can receive the values. they are still unavailable. in the flower care app i see all values. in the bluetooth scan i see the sensors but not in Home Assistant
@DanielXYZ2000 is this working in your setup `sensor:
on the console you should get: ` ~bluetoothctrl
Agent registered [CHG] Controller … XX:XX:… Discovering: yes [bluetooth]# scan on Discovery started [CHG] … [NEW] Device C4:X:XX:…XX:AC Flower care`
in my config it looks like
You don’t need BLE_ as prefix
@DanielXYZ2000
- platform: miflora mac: C4:7C:8F:61:2C:2A
like this?ok. perfect with the other terminal it is working, but the sensors are still unavailbale. how looks your mac adress of the sensor. did you also add the BLE? like: BLE_XX:XX:XX:XX?
im using this 😦
@Dreamoffice Which terminal add-on are you using? use the communitiy one: SSH & Web Terminal that should contain this command
@DanielXYZ2000 i never used terminal in HA. when i type i
bluetoothctl
just this message comes on:IMHO there are two different bugs:
This works for me: odroid xu4 + usb bt dongle HA 0.105 dietpi / kernel 4.14.66+ / bluez 5.43-2+deb9u1
1 miflora sensor 2meter away, so good connection. I have a 2nd one with a hardware/firmware bug. it takes one new battery every 4 weeks… I will buy another one.
I think my issues started with 0.104.x as well, I lowered the baudrate of my Pi 3B last sunday and no issues so far (about 56 hours later), still receiving data which matches with the values from the Flower Care app.
Found it here; https://github.com/raspberrypi/linux/issues/2264#issuecomment-344911712
Actually, I believe that this is a culprit of the issue in Hass.io. Before I updated to 0.104.x and HassOS 3.8, my miFlora worked good enough for almost a year. I had a small automation that was controlling whether the values were up-to-date, so didn’t need @ferbar update either. Now everything related to miFlora is broken which is quite annoying.