briis / smartweather

WeatherFlow Smart Weather Component for Home Assistant
MIT License
108 stars 11 forks source link

Add battery (volts) as sensors #23

Closed remkolems closed 4 years ago

remkolems commented 5 years ago

As both devices, obs_air and obs_sky, rely heavily on batteries, could u please add the battery status in Volts to your code?

Additional note: Via _https://swd.weatherflow.com/swd/rest/stations/?apikey=20c70eae-e62f-4d3b-b3a4-8586e90f3ac8 the "device_id":nnnn can be extracted. One unique device_id per obs_sky and per obs_air.

Subsequently via _https://swd.weatherflow.com/swd/rest/observations/?device_id=&apikey=20c70eae-e62f-4d3b-b3a4-8586e90f3ac8 amongst others the battery status can be extracted.

Update: Never mind! Using your other component smartweatherudp ! Thanks!

briis commented 4 years ago

I know this is a late answer. You are right that I can get the Voltage, but it will require an extra call to the REST server pr. device. As the voltage does not need to be updated as regular as the other sensors I will look to see if this can be implemented

remkolems commented 4 years ago

I understand and agree. Thanks in advance!