Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse numeric state to number #49

Open
creatvty opened this issue Aug 30, 2022 · 0 comments
Open

Parse numeric state to number #49

creatvty opened this issue Aug 30, 2022 · 0 comments

Comments

@creatvty
Copy link

Heyo, first of all thanks for your great integration.

Currently I am using your event sensor for getting steps from my mi band

event_type: android.intent_received
data:
  value: "10153"
  intent: com.mc.miband.stepsGot
  device_id: 1234
origin: REMOTE
time_fired: "2022-08-30T20:10:01.180434+00:00"
context:
  id: 1234
  parent_id: null
  user_id: 1234

I set the value property up to be my state but it seems this state does not get parsed to a number. It just remains as a string.

I was wondering if it you could use your parse_numbers function to parse the state from event.data to a numeric value or make that an option.

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant