[Custom Integration] Rental Control - for AirBnB, VRBO, etc

Yes it should handle that just fine. I have code in place to squeeze out spaces.

That being said I just put a fake number similar to what you provided into my test system and you’re correct that it’s not squeezing out the spaces. So, I obviously have a bug to go figure out.

Raised as: Phone numbers with spaces are not working correctly · Issue #207 · tykeal/homeassistant-rental-control · GitHub

v1.1.1 is now out. This fixes the problem that you were seeing. You will need to touch any door slots and toggle the Reset Code Slot option to get RC to properly manage the slot after the update.

Thanks so much Andrew, I’ll update it now.

Out of curiousity, what was special about this case?

Absolutely nothing. I had a bug in my logic that I thought I had already fixed. I don’t actually have any unit tests, because I haven’t figured out how to test everything, but this was something that I totally could easily have a test around, I just haven’t yet!

A question, I would like to create an automation that turns off a certain light bulb on the day of check-out at 11:00 am (check-out time). how can I do?

Your trigger will be “Calendar” Add Trigger, then Time and Location, then Calendar under entity select the rental control Calendar. Then select “Event End” for check out.

1 Like

Totally beat me to that!

LOL!! I know you’re always here to help.

No literally, beat me to it. I was just about to post when your’s popped in :smiley:

Hi Andrew, I’m wondering if Rental Control picks up changes in phone number? I can see on my calendar the phone number has been successfully updated and I’ve tried reloading the integration but it doesn’t change the code on Keymaster.

Once the code has been configured for the door slot RC will not modify it even if you’re using the phone number to generate the codes. If you’re trying to get an already assigned slot to pick up a change in the phone number, then you need to clear the slot and have RC re-allocate at which point it will pick up any changes related to phone numbers.

The reason behind this is that RC understands and allows for overriding the generated code. So, once it’s been assigned into Keymaster, then it’s set unless you explicitly override it, or clear the Keymaster slot and have RC re-allocate.

I see, it might be that actually there is a problem parsing 4 number numbers to get the last 4 digits? I have been putting in phone numbers as 4 digits numbers to get RC to use it as the code but it hasn’t been working.

If you’re using a custom calendar and not driving it off of one of the rental platforms, then you need to put the number into the desctiption in a specific way.

It needs to be in the event description as:

Phone (Last 4 Digits): 1234

or

Last 4 Digits: 1234

or

Phone: (123) 456-789

The spacing, capitalization, and punctuation all matter to the regular expressions that are used.

Point of clarification: in the Setup instructions when it states:

By default it will set up 5 sensors for the 5 nex upcoming events (sensor.rental_control_<calendar_name>_event_0 ~ 4). You can adjust this to add more or fewer sensors

Does that mean I need at least 5 code slots already setup in KeyMaster plus whatever static codes I already have OR that RC is going to create another 5 sensors/slots on top of the X number I already have in Keymaster?

PS: by trial and error I just figured out that this clearly means RC-hijacked slots must already exist within KM’s existing slot inventory. Appears I had it creating the default 5 slots, but starting at KM’s slot 5, which errors out given it’s trying to create an 11th code slot that doesn’t exist. Backing the configuration off to start at 5 and create 4 slots appears to have it working now, which is great!

You’re correct, RC uses defined Keymaster slots. It doesn’t control the lock itself, that’s all on Keymaster. All RC is doing is programming Keymaster slots with guest schedules and codes.

Thanks @tykeal for this integration. I’ve installed it successfully. Currently I have an AirBNB house that has automations that randomly turn on lights. Could you suggest the cleanest way to use Rental Control to skip the automations if the rental is reserved? Forgive me if this is obvious, I am somewhat new to HA.

My first thought was in my ‘turn on light’ automation to check the calendar.rental_control_X entity to see if the current date is contained within start_date and end_date and the Message is reserved, then the automation would not run.

But I feel like there is probably a better way to do this that I am missing.

Just check to see if calendar.rental_control_x is on or not. The calendar entity will automatically be on if a guest is scheduled to be at a place.

That being said, if you’re talking about driving some external lights such as your porch lights, I would recommend that you keep that guest agnostic and just always turn those on and off guest or no guest. That way, shady folks will have a harder time determining if people are there or not if they’re watching the place for a while. For instance, I have the exterior lights all programmed to go on 30 minutes before sunset and turn off 30 minutes after sunrise and additional logic to force the lights into the correct state if someone tries to toggle it. Additionally, I have the entryway lights all configured to automatically turn on if the door is unlocked (doesn’t matter time of day) and then turn off 5 minutes after the door is closed and / or the entryway is detected as being clear for that long.

If you’re talking about internal lights, then yes, my above suggestion should be all you need to do.

OK… cool, so calendar.rental_control_x is value of guest scheduled for current day?

Yes, I was talking about interior lights. My interior light automations are all randomized to try and not look timed and thus make the house appear vacant. And obviously I don’t want those automations to run if guests are there.

Thanks again… awesome work you’ve got here.

Yes calendar.rental_control_x is the calendar that RC is actually tracking for things. If you pull up the calendar sidebar in Home Assistant you’ll see the calendar there. All guest bookings from the platform (Airbnb in your case) will show up there. Please note, Airbnb removes finished bookings from the exported calendar so the only way to see past booking dates is on Airbnb itself.

1 Like