I’d suggest adding a simple json based implementation for this integration. Have every existing policy be its own entity with the state (or an attribute) be the json of this policy. Add an action to update a policy that takes a json as input, validates it against the schema and sends it off to the api.
This way functionality is added on a technical level without trying to find entity-workarounds with core HA features.
This then would allow the creation of a custom card that can handle the UI for this JSON. Similar to eg. Scheduler Card made for the Scheduler component.
May i ask about your overall experience with the OnlyCat Flap?
Is it reliably working in detecting multiple Cats with the id chip?
Is it reliably detecting prey?
And finally whats the state of Support by the company and the state of this integration?
Would you advise buying one?
My overall experience with the OnlyCat Flap is good.
I have two cats with an ID chip and they’re reliably detected.
Prey seems to be reasonably reliably detected. among all cases there’s only one where my cat got a mouse inside. Looking at the video there was only a frame or so showing the mouse.
Personally I don’t expect it to be perfect, but it has almost been perfect. So I’m pleased and don’t regret the purchase.
Support from the company is good. When my flap was damaged in shipping I got new parts for free.
One of my cats is able to open the flap from the inside while it is locked. I could send the flap back for a free upgrade, but since I don’t want to do that Only Cat offered me to buy new parts and replace myself. These haven’t arrived yet.
Apperently it is rare for cats to figure out this lock, but one of mine is both determined enough and smart enough to have figured this out.
The integration works well, I mostly use it to track if the cats are inside or not, but also to change policies, and notification of prey detection.
Of course there’s room for improvement, but it works well enough that development seems to have calmed down.
I would advise buying one, but consider getting the lock upgrade included in the order if you have a smart cat
The flap is a little bit pricy, and there are some features I still wait on (offline api and home/away states), but its a good cat flap. And not having to change batteries is a huge win.
Chip detection works well, worst thing happening to me is one of my cats having to stand for 5s before being detected sometimes, but his chip is kinda far back though.
Prey detection works great. I had no false negatives so far and just a few false positives due to big GPS trackers on their collars, if they lingered around the camera for too long. But I’m happy with leaving it unattended without worrying my cats won’t come home.
The developers provided us the base code for websocket communication used with their api and are supportive in maintaining the repo and officially allowing this custom client to connect to their api services. Which is already something one sadly can’t expect from most companies these days.
I would recommend OnlyCat, but still hope for some more features to arrive.
My Cat’s status stopped working recently, may have coincided with an HA update, the badges I had on a control panel stopped showing the cat’s in or out status.
I checked the integration and it wasn’t initialising, in the debug logs I got this:
2025-10-18 18:36:24.424 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry XX for onlycat
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 761, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/onlycat/init.py”, line 54, in async_setup_entry
await _initialize_pets(entry)
File “/config/custom_components/onlycat/init.py”, line 160, in _initialize_pets
last_seen = datetime.fromisoformat(rfid[“timestamp”])
TypeError: fromisoformat: argument must be str
So I changed line 160 or “/config/custom_components/onlycat/init.py” to force it to STR:
It then appeared to be returning nothing, so I ended up replacing line 160 with this:
timestamp = rfid.get("timestamp")
if timestamp:
last_seen = datetime.fromisoformat(str(timestamp))
else:
last_seen = None # or set a default datetime if needed
Now the integration initialises OK and I got both my cats status back.
Only took me… two months… But I finally had time to make a stab at this. I’ve opened the PR now and would really appreciate your eyes if/when you have time.
First time committing to this repo so obviously don’t hold back if anything is out of line in terms of PR style/length, code standards/etiquette etc.
I’ve included a (not brief) description of changes in the PR description as well as some screenshots. There’s still a couple of things I want to change in it, particularly around how the API is being queried, but I’m waiting to hear back from OnlyCat about that. For now it’s functional, just not super efficient.
Can anyone help me figure out how do I get the microchip ID (or cat name) from an entry/exit event?
As far as I can tell, the only sensor that would provide this is the “flap event” binary sensor, but I can’t seem to get any attributes out of it. I delved into the code and it looks like there should be attributes for:
rfidCodes
timestamp
eventTriggerSource
eventId
But none of those ever seem populated and always return a value of “None”. Am I misunderstanding something? Here’s my basic automation for testing this:
alias: "Cat Flap: Notify on event"
description: ""
triggers:
- trigger: state
entity_id:
- binary_sensor.oc_xxxxxxxx_event
to:
- "on"
conditions: []
actions:
- action: notify.mobile_app_xq_ec54
metadata: {}
data:
message: >-
"RFID codes: {{ state_attr('binary_sensor.oc_xxxxxxxx_event',
'rfidCodes') }}"
title: Cat Flap
mode: single
Hi
You correctly access the rfidcodes within the flap event.
Trigger this automation on any change on the binary sensor.
The event is a multistep event as communicated by the flap. The first movement already triggers the event to “on”. Additional information like rfid codes are added while it is already on, as soon as the cat flap reports it.
I trigger mine just with
- trigger: state
entity_id:
- binary_sensor.oc_xxxx_event
This may be the best device I have purchased in a while. When my Cat was stopped with pray yesterday morning I was really relieved that it worked so well.
I want to keep track of how often this happens, and with the OnlyCat integrated to Home Assistant that was pretty easy:
I created, with som help for Google/AI for the condition, an automation that increases a counter when the OnlyCat detects contraband. The condition is that the counter has not been changed for the last 10 minutes. My cat has only tried to bring a pray in once since installation last week, and only tried two times within a couple of minutes. This may have to be adjusted.
I use a helper, type Counter, that is updated by the automation. My helper is named “Ludvik stoppet med bytte”, meaning the Cat has been stopped with pray.
This is my automation to update the counter:
alias: Ludvik oppdatert teller stoppet med byttedyr
description: Med betingelse at det er minst 10 min siden sist forsøk med bytte.
triggers:
- trigger: state
entity_id:
- binary_sensor.oc_8c1f64481e52_contraband
to:
- "on"
conditions:
- condition: template
value_template: >-
{{ now() > (states.counter.ludvik_stoppet_med_bytte.last_updated +
timedelta(minutes=10)) }}
actions:
- action: counter.increment
metadata: {}
data: {}
target:
entity_id: counter.ludvik_stoppet_med_bytte
mode: single
I’m now trying to ensure I only get notifications once the RFID has actually been scanned but for some reason the not_to trigger setting just isn’t working as expected. I use it in lots of other automations and have never had a problem. My trigger is this:
Yeah that’s how I’m doing it now, just a bit weird that the not_to keyword doesn’t seem to work properly, given it works every other time I’ve used it. Could be that it’s buggy with attributes.
I sent them a message last week asking for this, but now that you mention it, let’s ask them here: @OnlyCat do you have any update about this? Could you please share your roadmap or timelines when the local access to the catflap will be available?
I am new to OnlyCat, just installed ours last week and so far loving it. I am also moving from Samsung SmartThings to HA very soon. So I am very interested in integration with HA. However, I have some experience with industrial automation and would like to see MQTT implemented with OnlyCat. I believe his would open up the local interface for lots of other use cases than just HA.
My vision would be for OnlyCat to be a MQTT client and configurable to connect with a MQTT broker using user/password authentication. Encryption with TLS probably not necessary at first (if ever). At first, the OnlyCat client could just publish with MQTT a topic and subtopics with status messages to the broker. Other applications like HA could connect to the broker and subscribe to the topic/messages. Would this make sense?