PiotrMachowski / Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor

This custom integration provides a way to present a live view of a map for Xiaomi (Roborock/Viomi/Roidmi/Dreame) vacuums without a need for rooting.
MIT License
1.14k stars 121 forks source link

Configuration Invalid - Possible New Token Format #416

Closed clutch70 closed 1 year ago

clutch70 commented 1 year ago

Checklist

The problem

Using the base config for the extractor entity, HA reports configuration invalid. It feels like maybe its barking because the token secret (working token for the Xiaomi Miio integration) is getting cast as an integer while the Map Extractor is expecting a string. I'm guessing it needs a fix because the token format in the readme.md is alphanumeric, therefore HA parses as a string. But the token I just got today from Xiaomi is numeric only.

Check and Restart
A basic validation of the configuration is automatically done before restarting. The basic validation ensures the YAML configuration doesn't have errors which will prevent Home Assistant or any integration from starting. It's also possible to only do the basic validation check without restarting.
Configuration invalid!

Invalid config for [camera.xiaomi_cloud_map_extractor]: expected str for dictionary value @ data['token']. Got 1111111111111111111111111111. (See ?, line ?).

replace my token with the 1s.

camera:
  - platform: xiaomi_cloud_map_extractor
    host: !secret xiaomi_vacuum_host
    token: !secret xiaomi_vacuum_token
    username: !secret xiaomi_cloud_username
    password: !secret xiaomi_cloud_password

What version of an integration has described problem?

2.2.0

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

roborock.vacuum.a27

What version of Home Assistant do you use?

2023.2.3

What type of installation are you running?

Home Assistant OS

Camera's configuration

camera:
  - platform: xiaomi_cloud_map_extractor
    host: !secret xiaomi_vacuum_host
    token: !secret xiaomi_vacuum_token
    username: !secret xiaomi_cloud_username
    password: !secret xiaomi_cloud_password

### Errors shown in the HA logs (if applicable)

```shell
Check and Restart
A basic validation of the configuration is automatically done before restarting. The basic validation ensures the YAML configuration doesn't have errors which will prevent Home Assistant or any integration from starting. It's also possible to only do the basic validation check without restarting.
Configuration invalid!

Invalid config for [camera.xiaomi_cloud_map_extractor]: expected str for dictionary value @ data['token']. Got 1111111111111111111111111111. (See ?, line ?).


### Additional information

_No response_
clutch70 commented 1 year ago

D'oh. Firewall in the way. Quoting the secret "" worked great