-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature/connectedto #14
base: master
Are you sure you want to change the base?
Conversation
Any estimate on when this will be merged into and updated in HACS? |
connectedToString = "Cellular! Signal Strength - " + str(connectedToJSON['signalStrengthPercent']) | ||
elif typename == 'ConnectedToBase': | ||
connectedToString = "Base ID - " + connectedToJSON['chargingBase']['id'] | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an additional connection state that can be returned
"lastConnectionState": {
"__typename": "ConnectedToWifi",
"date": "2022-06-08T06:10:57.475Z"
}
Hi @r-teller , Can you take a look at the fiDevice class? This has the connected to details but doesn't quite have the friendly translation as what you proposed in the fiPet class. Since this data is already present there, my suggestion is to enhance the existing class. |
I think i see what you are referencing, that you had this open PR and since I hoping to key off connectionState in HA |
The changes need to occur in the hass-tryfi repository. a new sensor is probably required that shows the connection state of the collar. |
try: | ||
typename = connectedToJSON['__typename'] | ||
if typename == 'ConnectedToUser': | ||
connectedToString = connectedToJSON['user']['firstName'] + " " + connectedToJSON['user']['lastName'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you're stringifying the state down in a library. Is there any way to leave it structured and make the calling app format it? I'd use this feature but generally a library like this shouldn't force a particular string format pattern.
No description provided.