{"id":20548558,"url":"https://github.com/benleb/sureha","last_synced_at":"2025-10-11T05:34:14.019Z","repository":{"id":46955582,"uuid":"363203831","full_name":"benleb/sureha","owner":"benleb","description":"SureHA 🐾 monitor \u0026 control your Sure Petcare devices via Home Assistant","archived":false,"fork":false,"pushed_at":"2025-04-22T12:40:08.000Z","size":168,"stargazers_count":29,"open_issues_count":40,"forks_count":18,"subscribers_count":14,"default_branch":"dev","last_synced_at":"2025-07-13T20:02:23.725Z","etag":null,"topics":["hacktoberfest","home-assistant","home-automation","homeassistant","surepet","surepetcare","surepy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benleb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"benleb"}},"created_at":"2021-04-30T16:49:06.000Z","updated_at":"2025-06-10T03:51:58.000Z","dependencies_parsed_at":"2024-07-29T16:18:02.751Z","dependency_job_id":"39dbf9be-00fa-41fb-9fd2-ba6dba1144ca","html_url":"https://github.com/benleb/sureha","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/benleb/sureha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benleb%2Fsureha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benleb%2Fsureha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benleb%2Fsureha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benleb%2Fsureha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benleb","download_url":"https://codeload.github.com/benleb/sureha/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benleb%2Fsureha/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006322,"owners_count":26084085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","home-assistant","home-automation","homeassistant","surepet","surepetcare","surepy"],"created_at":"2024-11-16T02:13:52.086Z","updated_at":"2025-10-11T05:34:14.004Z","avatar_url":"https://github.com/benleb.png","language":"Python","funding_links":["https://github.com/sponsors/benleb"],"categories":[],"sub_categories":[],"readme":"# SureHA 🐾\n\n\u003e documentation is currently in a bad state. I am aware of this and working on it!\n\n## Entities\n\nThis project creates the following entities in your Home Assistant instance:\u003cbr\u003e\n\n### sensor.cat_flap\n\nThere will be 1 entity per cat flap with the following attributes\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand!\u003c/summary\u003e\n  \n  This is a non-exhaustive list\n  \n| Attribute | Example |\n|---------------------|-------------------|  \n| ID               | 123456                                                                                      |\n| Parent device ID | 123456                                                                                      |\n| Product ID       | 6                                                                                           |\n| Household ID     | 123456                                                                                      |\n| Name             | Rivendell                                                                                   |\n| Serial number    | XXXX-XXXXX                                                                                  |\n| MAC address      | 2c549188c9e3                                                                                |\n| Index            | 0                                                                                           |\n| Version          | ODM2                                                                                        |\n| Created at       | December 19, 2018, 1:43:25 AM                                                               |\n| Updated at       | December 19, 2018, 1:43:25 AM                                                               |\n| Pairing at       | December 19, 2018, 1:43:25 AM                                                               |\n| Control          | curfew: \u003cbr\u003e- enabled:true\u003cbr\u003e lock_time:\"22:00\"\u003cbr\u003e unlock_time: \"07:30\"\u003cbr\u003e locking: 0\u003cbr\u003e fast_polling:false |\n| Parent           | |\n| Status           | locking:\u003cbr\u003e mode: 0 \u003cbr\u003eversion:\u003cbr\u003e battery: 5.07\u003cbr\u003e learn_mode:\u003cbr\u003e online:true                             |\n| Tags | |\n| Move | |\n\u003c/details\u003e\n\n### sensor.cat_flap_battery\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand!\u003c/summary\u003e\n  \n| Attribute | Example |\n|---------------------|-------------------|\n| Voltage             | 5.09              |\n| Voltage per battery | 1.27              |\n| Alt-battery         | 16.82560000000002 |\n\u003c/details\u003e\n\n### binary_sensor.hub\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand!\u003c/summary\u003e\n\n| Attribute   | Example |\n|-------------|---------|\n| Device rssi | -35.00  |\n| Hub rssi    | -35.00  |\n\n\u003c/details\u003e\n\n### binary_sensor.pet\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand!\u003c/summary\u003e\n\n| Attribute                  | Example                                                                |\n|----------------------------|------------------------------------------------------------------------|\n| Since                      | September 18, 2021, 4:09:42 PM                                         |\n| Where                      | 1                                                                      |\n| ID                         | 123456                                                                 |\n| Name                       | Thorin                                                                 |\n| Gender                     | 1                                                                      |\n| Comments                   | Such a good cute boy                                                   |\n| Household ID               | 123456                                                                 |\n| Breed ID                   | 384                                                                    |\n| Photo ID                   | 123456                                                                 |\n| Species ID                 |                                                                        |\n| Tag ID                     | 123456                                                                 |\n| Version                    | Mg==                                                                   |\n| Created at                 | April 1, 2021, 11:00:07 AM                                             |\n| Updated at                 | April 1, 2021, 11:00:07 AM                                             |\n| April 2, 2021, 10:20:49 PM |                                                                        |\n| Photo                      | id: 238217  \u003cbr\u003e location https://surehub.s3.amazonaws.com/user-photos/thm/imageURL.jpg |\n| Position                   | tag_id: 1233456 \u003cbr\u003e user_id: 123456 \u003cbr\u003ewhere: 1\u003cbr\u003e since: date                   |\n| Status                     | activity:\u003cbr\u003e tag_id: 123456 \u003cbr\u003euser_id: 123456\u003cbr\u003e where: 1 \u003cbr\u003esince: date          |\n\n\u003c/details\u003e\n\n### binary_sensor.flap_connectivity\n\n\n## Services\n\nThis project allows you to use the following services in Home Assistant:\u003cbr\u003e\n\n### SureHA: Set Pet location\u003cbr\u003e\n \n  This service call allows you to update the location of a pet. \u003cbr\u003e\n  Data needed:\u003cbr\u003e\n    - pet_id = this is the surepetcare id for your pet. \u003cbr\u003e\n    - where = options are \"Inside\" or \"Outside\"\n\nexample:\n```yaml\nservice: sureha.set_pet_location\ndata:\n  pet_id: 31337\n  where: Inside\n```\n\n### SureHA: Set lock state\n\n  This service call allows you to update the lock state of a flap.\n  \n  Data needed:\u003cbr\u003e\n    - flap_id = this is the surepetcare id for the flap you want to change.\u003cbr\u003e\n    - lock_state = \n  \n example:\n ```yaml\n service: sureha.set_lock_state\ndata:\n  flap_id: 123456\n  lock_state: locked\n```\n\n\n## Useful stuff\n\nThe following script and button card code was create by xbmcnut to set pets location to inside\n```yaml\nscript:\n  set_kobe_inside:\n    alias: 'Set Kobe Inside'\n    sequence:\n      - service: sureha.set_pet_location\n        data:\n          pet_id: '123456' #Kobe's Code\n          where: Inside      \n```\n\nButton card code:\n```yaml\nentity: binary_sensor.pet_kobe\nicon: mdi:cat\nlayout: icon_name_state\nshow_name: false\nshow_state: true\nstyles:\n  icon:\n    - color: \u003e\n        [[[ if (states['binary_sensor.pet_kobe'].state === 'on') return \"green\";\n        return \"red\"; ]]]\ntap_action:\n  action: more-info\nhold_action:\n  action: call-service\n  service: script.set_kobe_inside\ntype: custom:button-card\n```\n\nThe following script was created by sasgoose to toggle the location of a pet\n\n```yaml\nscript:\n  toggle_thorin_location:\n      alias: 'Toggle Thorin location'\n      sequence:\n        choose:\n        - conditions:\n            - condition: state\n              entity_id: binary_sensor.pet_thorin_2\n              attribute: where\n              state: 1\n          sequence:\n            - service: sureha.set_pet_location\n              data:\n                pet_id: '123456' # Thorin's pet id\n                where: Outside\n        - conditions:\n            - condition: state\n              entity_id: binary_sensor.pet_thorin_2\n              attribute: where\n              state: 2\n          sequence:\n            - service: sureha.set_pet_location\n              data:\n                pet_id: '123456' # Thorin's pet id\n                where: Inside\n                \n```\n\n\n## Upgrade *surepetcarebeta* to *sureha*\n\nDo a backup of your HA first. Its probably not needed but a backup is never a bad idea ;)  \nThe cleanest way will be to delete the *surepetcarebeta* integration completely and handle *sureha* completely independent. It will create the same entity/unique ids as before so your automations and graphs should not be affected.\n\n## enable the debug logging in `configuration.yaml` if something does not work as expected\n\n```yaml\n# logging\nlogger:\n  default: info\n  logs:\n    surepy: debug\n    custom_components.sureha: debug\n    custom_components.sureha.binary_sensor: debug\n    custom_components.sureha.sensor: debug\n```\n\n---\n\n## Naming confusion for *surepetcarebeta* users 🐾 🤪 🤦\n\nSorry for the bad naming and resulting confusion and chaos 🙄 To \"fix\" this, I **renamed *surepetcarebeta* to *sureha***.\n\n| Name | Repo | Type | Description | Need Help?\n|---|---|---|---|---|\n| **[surepy](https://github.com/benleb/surepy) 🐾** | [github.com/benleb/surepy](https://github.com/benleb/surepy) | Python Library | Library to interact with the API of Sure Petcare. Also provides Classes for the various Sure Petcare Devicess. Use this if you write an own python tool/app and want to interact with the Sure Petcare API | [Issues](https://github.com/benleb/surepy/issues) |\n| **[surepetcare](https://www.home-assistant.io/integrations/surepetcare)** ![HA Favicon](https://www.home-assistant.io/images/favicon.ico) | [github.com/home-assistant/core](https://github.com/home-assistant/core) | [Home Assistant](https://github.com/home-assistant/core) Integration | **Official Home Assistant Integration** for the Sure Petcare Devices like Doors, Flaps, Feeders, ...  | [Issues](https://github.com/home-assistant/core/issues), [HA Forum](https://community.home-assistant.io) |\n| | | | | |\n| **[sureha](https://github.com/benleb/sureha)** ~~surepetcarebeta~~ ~~[benleb/surepetcare](https://github.com/benleb/sureha)~~ | [github.com/benleb/sureha](https://github.com/benleb/sureha) | [Home Assistant](https://github.com/home-assistant/core) Integration | Home Assistant Integration developed in my own repo without reviews from the HA Team. This can be installed via [HACS](https://hacs.xyz/) and is something like a preview integration **for advanced users**. Usually this provides more (experimental) features and faster fixes but lacks the code quality (reviews) and such from HA | [Issues](https://github.com/benleb/sureha/issues) |\n| | | | | |\n| **[pethublocal](https://github.com/plambrechtsen/pethublocal)** | [github.com/plambrechtsen/pethublocal](https://github.com/plambrechtsen/pethublocal) | [Home Assistant](https://github.com/home-assistant/core) Integration | Home Assistant Integration developed by [@plambrechtsen](https://github.com/plambrechtsen) which works **completely independent from Sure Petcare**. Check outs his repo for more information! | [Issues](https://github.com/plambrechtsen/pethublocal/issues), [HA Forum](https://community.home-assistant.io) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenleb%2Fsureha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenleb%2Fsureha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenleb%2Fsureha/lists"}