Skip to content

Parse numeric state to number #49

@creatvty

Description

@creatvty

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions