home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.07k stars 30.56k forks source link

Bluetooth LE Miflora and Bluetooth LE Temperature and HUmidity sensor trouble. #19406

Closed kenand1970 closed 5 years ago

kenand1970 commented 5 years ago

Home Assistant release with the issue:

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):

Component/platform:

Description of problem:

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Traceback (if applicable):

Additional information:

kenand1970 commented 5 years ago

Home Assistant 0.84.1 Docker (Synology) I have two BLE sensors: Xiaomi LCD Temperature and Humdity sensor and Mi Flora sensor.

Both works if I put configuration.yaml. But if I put both sensors to Homeassistant configuration.yaml, Homeassitant shows only second one data on the configuration yaml:

Sample code in configuration.yaml:

   # Xiaomi Mi plant sensor
 sensor:
  - platform: miflora
    mac: C4:7C:8D:67:3B:XX
    name: MiFlora 1
    force_update: true
    median: 3
    monitored_conditions:
      - moisture
      - light
      - temperature
      - conductivity
      - battery      

      # Xiaomi LCD Teemperature sensor
 sensor:
  - platform: mitemp_bt
    mac: 4C:65:A8:D8:AD:XX
    name: Livingroom Temperaure Sensor
    force_update: true
    median: 3
    monitored_conditions:
      - temperature
      - humidity
      - battery             

Home Assistant shows only LCD sensors data

home1

After I changed order sensors in configuration.yaml ( Mi Flora than second one)

      # Xiaomi LCD sensor nagyszoba
sensor:
  - platform: mitemp_bt
    mac: 4C:65:A8:D8:AD:XX
    name: Nagyszoba Hőmérő
    force_update: true
    median: 3
    monitored_conditions:
      - temperature
      - humidity
      - battery             
      # Xiaomi Mi plant sensor
sensor:
  - platform: miflora
    mac: C4:7C:8D:67:3B:XX
    name: Növénymontotor 1
    force_update: true
    median: 3
    monitored_conditions:
      - moisture
      - light
      - temperature
      - conductivity
      - battery      

LCD sensors data disappered, and Mi Flora data shown: home2

I do not know how can I use both sensors together

cgarwood commented 5 years ago

Get rid of the second sensor: line in your config.

sensor:
  - platform: mitemp_bt
    mac: 4C:65:A8:D8:AD:XX
    name: Nagyszoba Hőmérő
    force_update: true
    median: 3
    monitored_conditions:
      - temperature
      - humidity
      - battery             
      # Xiaomi Mi plant sensor
  - platform: miflora
    mac: C4:7C:8D:67:3B:XX
    name: Növénymontotor 1
    force_update: true
    median: 3
    monitored_conditions:
      - moisture
      - light
      - temperature
      - conductivity
      - battery
kenand1970 commented 5 years ago

Thank you very much, works!

What about if I have 2 LCD sensors and one Mi Flora? Is it good?

sensor:
  - platform: mitemp_bt
    mac: 4C:65:A8:D8:AD:XX
    name: Livingroom Temp 
    force_update: true
    median: 3
    monitored_conditions:
      - temperature
      - humidity
      - battery      
 - platform: mitemp_bt
    mac: 4C:65:A8:D8:AD:YY
    name: Kidsroom  Temp
    force_update: true
    median: 3
    monitored_conditions:
      - temperature
      - humidity
      - battery                    
      # Xiaomi Mi plant sensor
  - platform: miflora
    mac: C4:7C:8D:67:3B:XX
    name: Növénymontotor 1
    force_update: true
    median: 3
    monitored_conditions:
      - moisture
      - light
      - temperature
      - conductivity
      - battery
cgarwood commented 5 years ago

Yes, that should work (though your mac addresses on both mitemp_bt sensors is the same in the example above. Assuming the mitemp_bt supports multiple instances.

cgarwood commented 5 years ago

Closing this as there have been no further updates.