Ludy87 / xplora_watch

Xplora® Watch Home Assistant Integration
MIT License
50 stars 6 forks source link

[🐛 BUG] Step-counter not working #43

Closed xeor closed 2 years ago

xeor commented 2 years ago

System Health details

System Information

version core-2022.8.0
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.10.5
os_name Linux
os_version 5.15.58-flatcar
arch x86_64
timezone Europe/Oslo
config_dir /config

Checklist

Describe the issue

I'm getting data from the xplora watch into hass, but for some reason, sensor.kid_name_watch_step_day_XXX is unknown. All other fields works including sensor.kid_name_watch_xcoin_XXX..

I can see the steps in hass.data['xplora'][0].watchs[0]['ward']['currentStep'], but I'm not sure what ward means and/if this is correct.. There is also hass.data['xplora'][0].watchs[0]['guardian']['currentStep'] which is None

Reproduction steps

  1. Setup watch in hass
  2. Wait a day
  3. Still no steps ...

Debug logs

home-assistant 2022-08-05 10:07:41.328 DEBUG (MainThread) [custom_components.xplora_watch.sensor] Updating sensor: Kids Name Watch Xcoin XXX | XCoins: 256                   
home-assistant 2022-08-05 10:07:41.485 DEBUG (MainThread) [custom_components.xplora_watch.sensor] Updating sensor: Kids Name Watch Step_Day XXX | Step per Day: None         
home-assistant 2022-08-05 10:07:42.259 DEBUG (MainThread) [custom_components.xplora_watch.sensor] Updating sensor: Kids Name Watch Battery XXX | Battery: 62 | Charging False
xeor commented 2 years ago

I can confirm that this fixed it! Awesome, thanks!