Sorry, I didn’t make it clear - I did all of what you had said, and it still didn’t work for me with those instructions. After updating, I rebooted. Then, I first tried making a change to get it to rebuild, and that didn’t work. Then, I removed and re-set up the config, and that still didn’t work.
After that, I renamed the lock, and re set up Keymaster & Rental Control, all just with single word names for everything like “test”, and that worked pefectly.
From there, I renamed the lock itself to something including numbers - but not only numbers - and did the same with Keymaster and Rental Control, and that worked perfectly as well.
Maybe there’s a similar bug with Keymaster and only-numbers that needs fixed as well - I definitely have no idea about that.
But, at this point, everything is working perfectly for me, so I’m happy!
Thanks again for all of your help and assistance!!
NOTE: Rental Control is currently incompatible with HA 2023.9. See this issue related to it. I have not had a chance to dig into the exact cause and will not have a chance to dig in for a bit on it.
If you rely on RC with your HA setup, do not upgrade to 2023.9 until this is resolved!
Following up on this. Version v0.9.2 has now been released and resolves the issues with HA 2023.9, this version is also backwards compatible so you are free to upgrade to this version without upgrading to HA 2023.9. If, however, you have already upgraded to HA 2023.9, then this version is required for Rental Control to work.
Version 1.0.1 is now released (yes, 1.0.0 was released but I found a bug almost immediately)
Release highlights (see the in HACS notes for comments related to upgrade):
No more automations in use! All management of slots is done by the integration
Reloads of the integration will always cleanly work now
KeyMaster slot management will now properly follow changes to the start and end dates of events. Start / stop times can still be overridden and even if the any of the dates change the override will not be lost
The weird issue where events would sometimes change which slot they were assigned to should now be completely fixed
The Mapping Sensor, which never really worked properly in the UI, has been removed.
During a restart of the integration or Home Assistant itself, lock management will not be performed until all data is fully ready. This means that if the calendar is not accessible for some reason during startup that codes will not be cleared or added to the KeyMaster configuration until the calendar is successfully loaded. KeyMaster itself will continue to operate on already configured slots per normal, this is strictly about adding, removing, or modifying data to KeyMaster slots.
Calendar and Event entities are Unavailable until all data is available. This avoids issues with calendar entities not being ‘On’ or ‘Off’ when they should be which could mess up automations that you may have developed to use the entity. This holds for the event entities as well where they could previously load up and provide incorrect data while the rest of the integration was still starting up.
Is this integration really dependant on Keymaster and will not work without it? I have no z_wave locks and lets say not planning on using any locks but just want to integrate with Airbnb. Can I still use Rental Control without Keymaster?
I have no plans on providing a way to modify entries when you are not using KeyMaster. The reason is fairly simple, if you aren’t driving a KeyMaster configuration than I have no easy programmatic way of getting the data needed to modify check-in/check-out times.
The integration is coded in a way that if there is no lock configured to be managed then it turns off the override subsystem.
If you really want to be able to do overrides but don’t want it to manage a lock (or can’t have it manage a lock because KeyMaster isn’t compatible for some reason) then you can configure a dummy lock. My test instance doesn’t have an actual lock confiugred in it so I use the Virtual Components integration available in HACS and created a virtual lock. You still have to have ZWave setup, even if you don’t have a ZWave controller, it just spews (at a fairly low rate) complaints into the logs about issues setting up the ZWave
With that in place you can configure KeyMaster to “manage” that lock and then configure Rental Control to manage slots on that. Once you have that in place you can override the in/out times as well as the lock code.
Yes, this looks fine, not looking for perfection, so this seems like a good option. Fingers cross that HA integrates SETCODE for SmartThings and may I will be able to use KeyMaster soon.
It’s perfectly reasonable to use it without KeyMaster at all. I do so that my home HA has my remote locations calendars locally for me to quickly look at the calendars.
Heck, my home HA has the integration configured 11 times 3 of those do not drive locks! The other 8 do:
3 rental properties - no KeyMaster configured
6 locks at my house:
Front Door (managed 4 times over various slot counts for the guest bedrooms)
4 guest bedrooms (managed 1 time each)
1 main bedroom - not managed by RC at all, but still managed by KeyMaster so that I can manage the codes without having to program them directly. Also good for allowing me to disable codes when my family goes out of town for a few days since we have a code in the door our 4 year old can do easily (was put in when he was 3 and started pushing buttons).
I considered trying to use the KeyMaster parent/child setup, to not have so many RCs installed, but the complexity of trying to get that to work easily was just pushing the burden of multiple integrations over to KeyMaster. It’s much simpler with having multiple RCs configured for me! It does, however mean I have to update two locks if there is a change to the guest in/out time or PIN.
The adding of .ICS calendars to HA by itself is awesome. With configurable refresh rate as low a 1 minute is great. The current default is adding the .ICS to a Google Calendar which is very difficult to integrate into HA, then the updates are only twice daily. So, many exceptions like same day reservations and extended reservations are usually not registered in time.
So kudos to you for a great integration with Rental Control, everything else it does is gravy!
Despite the odds, this dummy has managed to install and configure HAOS, then HACS, then Rental Control. Just a couple weeks ago I was banging my head on the desk trying to get Homekit setup.
Needless to say HAOS concepts are very new to me. The only automation I’ve setup is turning exterior lights on 00:15 after sunset, off at 23:00.
I’ve got a listing at Airbnb but we’re just starting out so availability is blocked and the listing is unpublished. What’s a good way of testing different automations and scenes before we have real bookings?
FWIW, I’m mostly interested in lighting and thermostat controls. During a reservation, turn most automations off. Between reservations, turn some lights on to make it look occupied.
Rental control calendars are REALLY AWESOME with helping with automation when the unit is un occupied or occupied. I control lights, thermostats, fridge, water heater, and a few other amenities via Home Assistant Automation.
A while back when I first setup my Airbnb, about 5 years ago, I asked Airbnb to put in a test reservation for me. I don’t know if they can still do that as their system has changed many times.
Rental Control supports custom calendars. I personally use Google Calendar for testing when I’m making changes to it.
The current docs detail what you need to do to create custom events. In other words, there is no need to ask Airbnb for a test reservation
To go more in depth here’s how I use RC in conjunction with Keymaster at several properties:
RC manages the lock codes into Keymaster (the whole reason I wrote it!)
I have a custom automation (available as a blueprint) that sends a notification to a Zulip stream when a guest enters the door code for the first time. The same blueprint, auto-resets the needed input_boolean toggle helper to off when the RC calendar event turns off at the end of the guest stay
I have another blueprinted automation that follows a Waste Collection Schedule calendar (see HACS) for asking my property manager, cleaner, or me (via Zulip) to request of the guests, the cleaner, or myself to take the garbage / recycling cans out the night before they need to. If the guest says no (or doesn’t respond to my property manager), my property manager lets me know and I run out there that night or super early in the morning to get the cans out
I have an automation that switches the thermostat schedule based on if I have guests or not. If I don’t have guests for a few days it switches to a ‘No guests’ schedule. If I have guests coming in, then it switches to my guest schedule a few hours before they are supposed to arrive so that the property is at a comfortable temperature. If I have a guest turn over on the same day, it just makes sure that the schedule is still properly configured in case we had switched to a custom schedule for our guests.
We have an automation tied to entry that makes sure the entry lights come turn on when a guest puts in their door code, or even manually unlocks the door
We have an automation in place that makes sure that the exterior lights come on 30 minutes before sunset and turn off 30 minutes after sunrise and will force the lights into the correct configuration if someone tries to turn them off or on outside of the schedule.
We have an automation to auto-lock the door when it is closed for a certain amount of time. I’m not using the built in Keymaster one because I found it didn’t support my specific desires, so I wrote my own.
So, between RC and Keymaster we’re doing all sorts of things
I’m getting this error and no calendar entities are being created.
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:359
Integration: Sensor (documentation, issues)
First occurred: 10:12:36 PM (4 occurrences)
Last logged: 10:16:24 PM
Error while setting up rental_control platform for sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 359, in _async_setup_platform
await asyncio.shield(task)
File “/config/custom_components/rental_control/sensor.py”, line 31, in async_setup_entry
await coordinator.update()
File “/config/custom_components/rental_control/init.py”, line 515, in update
slot_code.as_dict()[“state”],
^^^^^^^^^^^^^^^^^
AttributeError: ‘NoneType’ object has no attribute ‘as_dict’
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:359
Integration: Sensor (documentation, issues)
First occurred: 10:12:36 PM (4 occurrences)
Last logged: 10:16:24 PM
Error while setting up rental_control platform for sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 359, in _async_setup_platform
await asyncio.shield(task)
File “/config/custom_components/rental_control/sensor.py”, line 31, in async_setup_entry
await coordinator.update()
File “/config/custom_components/rental_control/init.py”, line 515, in update
slot_code.as_dict()[“state”],
^^^^^^^^^^^^^^^^^
AttributeError: ‘NoneType’ object has no attribute ‘as_dict’
Awesome work on the project, man! Got a way I can buy you a beer or something?
Quick question on the calendar stuff—I’ve hooked up two Airbnb calendars and one Google calendar for my own stays. Now, my stays are on the same days every week, but Rental Control seems to trip up when it comes to recurring events. Single events? No problem. Recurring events? Invisible. What’s the deal? Am I messing up somewhere?
@freejan, Rental Control doesn’t know how to deal with recurring events at all. Given that it was written to support short term rental platforms and none of those ever have recurring events. As such, the code actually explicitly skips RRULE event definitions. You should be seeing an error in your logs along the lines of:
RRULE in event <Event Summary>
You can raise a feature request in the issue tracker if you want, or raise a PR to add the feature. I’ll be up front though, this isn’t something I really want to add as RRULEs can be extremely complex and writing the logic to handle them sanely isn’t something I want to worry about. While I use a library for parsing the iCals itself, it’s the actual handling of how an event defined by an RRULE gets managed by RC that is my concern.
I build a config with a Intel NUC, Zooz 700 USB, and a cheap Zwave lock to test it out. I have the lock being control by Keymaster. I’ve tested the codes with keymaster and it is working, I’ve taken a calendar from one of the active rentals to test rental control.
Rental control was working prior to the Keymaster install as I didn’t install Keymaster until the test lock arrived. When it didn’t work, I’ve uninstalled both and reinstalled each but same thing. I will try a fresh install of everything today.