Skip to content
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

Feat: Remove use of frontend automations #173

Merged
merged 32 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4874a93
Chore: Bump icalendar version requirement
tykeal Sep 17, 2023
acee154
Feat: Get Keymaster overrides on startup
tykeal Sep 18, 2023
f214196
Chore: Cleanup startup automation
tykeal Sep 18, 2023
525211f
Refactor: Standardize on using config_entry
tykeal Sep 19, 2023
eb319b4
Refactor: Simplify RentalControl init and annotate
tykeal Sep 19, 2023
08f9206
Refactor: Annotate RentalControl class more
tykeal Sep 19, 2023
6e9957d
Refactor: Finish RentalControl annotation cleanup
tykeal Sep 19, 2023
73d05d1
Chore: Set integration_type in manifest
tykeal Sep 19, 2023
23e12df
Chore: Bump HACS install reqs
tykeal Sep 19, 2023
c5fed9d
Refactor: Prep for adding sub/unsub of events
tykeal Sep 20, 2023
2aa1415
Feat: Move mapping update to event listener
tykeal Sep 21, 2023
310f9d3
Refactor: Rename rental_control to coordinator
tykeal Sep 21, 2023
87c7307
Feat: Mapping is now more responsive to overrides
tykeal Sep 22, 2023
c545b2c
Refactor: Move clear code from automation
tykeal Sep 23, 2023
6630917
Feat: New overrides handling
tykeal Sep 26, 2023
644211f
Refactor: Start migration of event overrides
tykeal Sep 27, 2023
f31c2ce
Feat: Calendar updates refresh event sensors
tykeal Sep 27, 2023
cfa6c58
Chore: Remove mapping sensor creation
tykeal Sep 27, 2023
e577ab3
Refactor: Stop using automation for setting slots
tykeal Sep 28, 2023
c25c524
Refactor: Move add_call to separate function
tykeal Sep 28, 2023
33ec5f6
Feat: Teach slots how to follow date changes
tykeal Sep 28, 2023
164909d
Refactor: Move info logs to debug
tykeal Sep 28, 2023
d8a21c6
Chore: Finalize removal of old mapping sensor
tykeal Sep 28, 2023
3bebadd
Refactor: Add type hinting to calendar sensor
tykeal Sep 28, 2023
0df575e
Chore: Remove old fire_set_code
tykeal Sep 28, 2023
95f2229
Fix: Add prefix back to slot names if defined
tykeal Sep 28, 2023
c68d29b
Chore: Cleanup package generation
tykeal Sep 29, 2023
abdaffb
Chore: Remove final RentalControl services
tykeal Sep 29, 2023
adaf963
Chore: Cleanup unused functions
tykeal Sep 29, 2023
baeb92f
Refactor: Get rid of old overrides system
tykeal Sep 29, 2023
c2b7f71
Feat: Finalize upgrade to schema v6
tykeal Sep 29, 2023
c56bd99
Docs: Update the documentation
tykeal Sep 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 54 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,51 @@ calendars and sensors to go with them related to managing rental properties.
- Reservation url -- the URL to the reservation
- Integration with [Keymaster](https://github.com/FutureTense/keymaster) to
control door codes matched to the number of events being tracked
- Custom calendars are supported as long as they provide a valid ICS file via
an HTTPS connection.
- Events on the calendar can be done in multiple ways, but all events will
be treated as all day events (which is how all of the rental platforms
provide events).
- The event Summary (aka event title) _may_ contiain the word Reserved.
This will cause the slot name to be generated in one of two ways:
- The word Reserved is followed by ' - ' and then something else, the
something else will be used
- The word Reserved is _not_ followed by ' - ' then the full slot will
be used
- The Summary contains nothing else _and_ the Details contain
something that matches an Airbnb reservation identifier of
`[A-Z][A-Z0-9]{9}` that is a capital alphabet letter followed by 9
more characters that are either capital alphabet letters or numbers,
then the slot will get this
- If the the Summary is _just_ Reserved and there is no Airbnb code in
the Description, then the event will be ignored for purposes of
managing a lock code.
- Technically any of the othe supported platform event styles for the
Summary can be used and as long as the Summary conforms to it.
- The best Summary on a manual calendar is to use your guest name. The
entries do need to be unique over the sensor count worth of events
or Rental Control will run into issues.
- Additional information can be provided in the Description of the event
and it will fill in the extra details in the sensor.
- Phone numbers for use in generating door codes can be provided in
one of two ways
- A line in the Description matching this regular expression:
`\(?Last 4 Digits\)?:\s+(\d{4})` -- This line will always take
precedence for generating a door code based on last 4 digits.
- A line in the Description matching this regular expression:
`Phone(?: Number)?:\s+(\+?[\d\. \-\(\)]{9,})` which will then
have the "air" squeezed out of it to extract the last 4 digits
in the number
- Number of guests
- A line in the Description that matches: `Guests:\s+(\d+)$`
- Alternatively, the following lines will be added together to get
the data:
- `Adults:\s+(\d+)$`
- `Children:\s+(\d+)$`
- Email addresses can be extracted from the Description by matching
against: `Email:\s+(\S+@\S+)`
- Reservation URLS will match against the first (and hopefully only)
URL in the Description

## Installation

Expand Down Expand Up @@ -108,21 +153,11 @@ The integration is set up using the GUI.
slot set correctly for the integration.

- It is _very_ important that you have Keymaster fully working before
trying to utilize the slot management component of Rental Control. In
particular the `packages` directory configuration as Rental Control
generates automations using a similar mechanism to Keymaster.
- **NOTE:** It is very important that the Keymaster slots that you are
going to manage are either completely clear when you setup the
integration _or_ that they follow the following rules:

- The slot name == Prefix(if defined) Slot_name(per the event sensor)
- The slot code == the defined slot code matches what is currently in
the event sensor
- The start and stop dates and times match what are in the sensor

Failing to follow these rules may cause your configuration to behave in
unexpected way.

trying to utilize the slot management component of Rental Control.
- **NOTE:** The Keymaster slots that are defined as being managed will be
completely taken control of by Rental Control. Any data in the slots
will be overwritten by Rental Control when it takes over the slot unless
it matches event data for the calendar.
- The following portions of a Keymaster slot will influence (that is
override) data in the calendar or event sensor:
- Checkin/out TIME (not date) will update the calendar event and also
Expand All @@ -137,9 +172,6 @@ The integration is set up using the GUI.
slot that has the same door code (or starting code, typically first
4 digits) that is the generated code and thus causing the slot to
not function properly
- An additional "mapping" sensor will be generated when setup to manage a
lock. This sensor is primarily used for fireing events for the generated
automations to pick up.

## Reconfiguration

Expand All @@ -156,5 +188,7 @@ the `...` menu next to `Configure` and select `Reload`

## Known issues

While the integration supports reconfiguration a few things are not presently
working correctly with this. If you are needing to change
While the integration supports reconfiguration a few things may not fully update
after a reconfiguration. If you are having issues with reconfigured options
not being picked up properly try reloading the particular integration
installation or restart Home Assistant.
Loading
Loading