Closed ryanbuckner closed 6 months ago
You can check out https://github.com/home-assistant/core/tree/dev/homeassistant/components/life360. If you'd like a simpler example, I could provide something maybe in a few days.
Thanks. If you don’t mind. No rush. Ryan @. Dec 24, 2023, at 2:52 PM, Phil Bruckner @.> wrote: You can check out https://github.com/home-assistant/core/tree/dev/homeassistant/components/life360. If you'd like a simpler example, I could provide something maybe in a few days.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
I was able to update my Indigo Plugin from your solutions to the Cloudflare blocking problem. Thank you!
Closing this issue
FWIW:
import asyncio
from life360 import Life360
async def main():
username = input("username: ")
password = input("password: ")
api = Life360()
try:
authorization = await api.get_authorization(username, password)
print("Authorization:", authorization)
finally:
await api.close()
asyncio.run(main())
Thanks Phil.
On Tue, Dec 26, 2023 at 5:50 PM Phil Bruckner @.***> wrote:
FWIW:
import asyncio from life360 import Life360
async def main(): username = input("username: ") password = input("password: ") api = Life360() try: authorization = await api.get_authorization(username, password) print("Authorization:", authorization) finally: await api.close()
asyncio.run(main())
— Reply to this email directly, view it on GitHub https://github.com/pnbruckner/life360/issues/11#issuecomment-1869808470, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANTBKO3OKELXGHBSVQLI7TYLNIDRAVCNFSM6AAAAABBBXBQBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRZHAYDQNBXGA . You are receiving this because you modified the open/close state.Message ID: @.***>
FWIW:
import asyncio from life360 import Life360 async def main(): username = input("username: ") password = input("password: ") api = Life360() try: authorization = await api.get_authorization(username, password) print("Authorization:", authorization) finally: await api.close() asyncio.run(main())
Upon running this code I am getting this error: missing 2 required positional arguments: 'session' and 'max_retries'
@andrewcincotta that's because since that comment was made, the API has changed. If you want to use that code, then make sure you're installing version 6.0.1. The latest beta, v7.0.0b1, works a bit differently.
So this API is no longer dead?
Hard to say. I'm trying to revive it.
I'm using this outside of HA byt building a plugin for Indigo Domotics. The latest Life360 update broke the plugin and I may adopt this solution. I'm currently using harperreed solution.
I know you don't support outside of HA. But can you please provide a simple example of how to authenticate the API and grab circles / members and I'll figure out the rest?