Closed LaStrada closed 1 year ago
Will this break the current airthings ble
integration in Home Assistant? By changing name I can see that all sensors get a new name. E.g. sensor.humidity
is now unavailable (can be deleted) and a new sensor.airthings_wave_gen_1_humidity
has shown up.
This is probably a thing to be fixed in HA Core, but I'm not sure how to fix that.
Edit: this was fixed by introducing a friendly_name
only for devices without a name, so Airthings BLE integration in Home Assistant can still use the device.name
(same as before) and then no new entities will be created.
Perfect, thanks :)
This PR fixes naming for Wave gen. 1 + improve data for other devices.
What's fixed
Additional data
Adding more data to the
AirthingsDevice
class:Device name
Wave gen. 1
Wave gen 1 returned
AT#123456-2900Radon (Serial Number)
on Linux and(Serial Number)
on Mac. This is not masked serial number, but for some reason it wasSerial Number
.For those devices the serial number is part of the advertisement data, but I wasn't able to fetch it. But it's also part of the name of the device, so this is now fetched from the name.
Other devices
Linux:
Airthings <model> (123456)
Mac:
()
(123456)
Made a fallback if the device has no name so it will now be
Airthings <model>
.Examples:
Airthings Wave Plus (123456)
Airthings Wave Gen. 1 (123456)
(noidentifier
, see below)Other fixes
Pluss
=>Plus
)DEVICE_TYPE
– a mapping to all supported devices which can be used to show model type in Home Assistant.Wave2
(wave gen 2) is rebranded toWave Radon
How to test
I have created a test branch for this. Remember to install this
airthings-ble
. https://github.com/LaStrada/core/tree/imrpve-airthings-ble