-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Request: Ability to set pets home/away from Home Assistant #5
Comments
I was just thinking... Is surepy available to an HA script? Until this could be officially implemented, I could just have an input selector that runs surepy when I set it to home/away. |
+1 Love to see the ability to do this too. I see some mention of it in the code. |
I would absolutely love this! Being able to create an NFC chip to cycle the location would be awesome because our oldest cat just doesn't want to learn how to use the cat flap! |
Agreed ... this would be a useful addition! |
available in the dev branch now ;) but you have to enter the pet id for now, sorry ✌️ |
Awesome. Can you share the service call for that? |
Thanks, but on the dev version you got me to install (bba9b0d), I'm not seeing that service as an option. |
that change came in a commit after yours, refresh HACS or restart HA and you should be able to update :) (Otherwise, try reinstalling the dev 👍 ) |
Thanks. The problem is when your running a dev version, there is no longer an option to 'reinstall' as the add-on wants you to install the latest current version. So you have to kind of upgrade to 2.3 and then reinstall to have the ability to pick the new dev version. [EDIT] Apologies, I take that back. Going into the integrations and clicking on the add-on reveals the reinstall option. Picking dev again now. |
Working great now. For others wanting to do this, I've set up a hold action on this custom-button card to call a script to set the pet as inside.
And the code for button shown above. Icon changes from green to red when pet goes outside.
|
THIS IS AWESOME! |
Updated my card above as I forgot to add the service call. Now changed it to a |
Got mine all setup in NR. This is super sweet. Thanks @benleb |
this reminds me at a project I played with some time ago... https://github.com/benleb/ad-catrack |
Is it possible to do the opposite here? I.e. when set their home/away status based on if the cat flap says they are inside/outside? |
Sorry, not quite sure what you're wanting to do. |
Hm mounted the flap the wrong way around? 😂 But I think that's a real edge case we shouldn't implement in sureha 😅 But to solve your problem, you could probably do a binary template sensor like |
I have my pet setup as a ‘person’. I would like her status synced with SureHA. So when the cat flap shows her as outside, the person is marked as away and when the cat flap shows her as inside, she is marked as home. This could be done by creating a device tracker for each pet I guess? |
Trying to create a script to switch the state. Any script expert around here? Thanks in advance for your help.
|
In the "useful things" section of the Readme I added a toggle location script. But there may be a better way of doing it. script:
toggle_thorin_location:
alias: 'Toggle Thorin location'
sequence:
choose:
- conditions:
- condition: state
entity_id: binary_sensor.pet_thorin_2
attribute: where
state: 1
sequence:
- service: sureha.set_pet_location
data:
pet_id: '123456' # Thorin's pet id
where: Outside
- conditions:
- condition: state
entity_id: binary_sensor.pet_thorin_2
attribute: where
state: 2
sequence:
- service: sureha.set_pet_location
data:
pet_id: '123456' # Thorin's pet id
where: Inside |
@sasgoose Thanks a lot, it works like a charm with your version. |
And here my combined card for displaying the status and changing the parameters. Tap-hold on the cats with toogle the state as done by @xbmcnut .
|
When our cats get out/in the human door, it would be nice to be able to set their status via Home Assistant
The text was updated successfully, but these errors were encountered: