Giter VIP home page Giter VIP logo

homeassistant-rental-control's People

Contributors

basschipper avatar jcgoette avatar joestump avatar olen avatar pre-commit-ci[bot] avatar quentinsf avatar tybritten avatar tykeal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

homeassistant-rental-control's Issues

cannot import name 'calculate_offset' from 'homeassistant.components.calendar' error

After upgrading to 2022.4.0 I installed Rental Control. I'm getting error below on startup of HAss

Unable to prepare setup for platform rental_control.calendar: Platform not found (cannot import name 'calculate_offset' from 'homeassistant.components.calendar' (/usr/src/homeassistant/homeassistant/components/calendar/__init__.py)).

There's reference to a breaking change in a couple of other posts, but I can't see anything in release notes on this.

Unit tests should exist

There should be working unit tests to validate in CI.

  • Mock Keymaster
  • Generate valid calendars to test / force tests to always run on a give datetime for the system
  • Mock calendar loads

Entities and attributes

with a Prefix set of AB
Using the entities card
An entity name shows as 'AB Airbnb (Not available)'
however a reservation entry shows 'AB Reserved'
Can I suggest
a) dropping the 'Airbnb' if a prefix has been defined
b) adding the prefix to an entity which currently just says 'No reservation'

The repeating of the info in the entity attributes and the entity state is kind of confusing. I need to think this through before making suggestions.

Question...
if event_0 is the next / currently active event I assume event0 will be rewritten with event_1 info when the end date/time is in the past.
Is this triggered at checkout time? or when ?
is an entity possible for the just expired booking? eg to cater for late check-out request or for post departure correspondence ???

Max number of days to fetch does not work

Setting the Max number of days into the future to fetch option should limit how many events to fetch to only the events that start within the window of today + $days

Allow setting the TZ for a calendar

Request to add setting the TZ of a given calendar instead of always using the HA instance TZ. This will allow for better flexibility in how the calendars are handled, particularly around event expiration.

Find which slot to use based upon availability and reservation code

The rental control entity hold 3 pieces of information that is vital to this:

  1. The lock to be managing against
  2. The starting slot number to manage at
  3. The number of reservations (sensors / slots) to be managing

With this information, the rental control entity should query against the HAS data for the Keymaster lock slot name information for the starting slot through the managed slots number. This information should be saved off for easy reference and refreshed on changes to those input_text entities.

The data that should get stored into the input_text entity should be either 'No Reservation' if no reservation is assigned to the slot, or the reservation code if one is assigned to the slot.

This should all be stored in a rental control list attribute for easy lookup of availability and where things should be managed.

Check Calendar less frequently

Can you add a facility to limit the frequency of retrieving information from a calendar?
Or even a way to spot that you have that error and delay the next request for a suitable period??
I am getting 'Too many requests' error when accessing the same calendar by other means.

Won't install

I've removed keymaster and your early version and used HACS as suggested.
That went smoothly.

Adding integration fails with 'config flow could not be loaded'.

In my previous attempt this was solved by installing Keymaster, but you have indicated that keymaster is no longer required so trying to leave it out.

Handle non-200 requests

When a URL is called it's possible that it doesn't return with a 200 class code. These should be handled gracefully instead of dumping a trace in the logs. Instead, a better error message should be logged.

Last 4 Digits string

Hello,

In order to use the last 4 digits of phone numbers as code, README states "event description contains 'Last 4 Digits' followed quickly by a 4 digit number"

event description contains 'Last 4 Digits' followed quickly by a 4 digit

Whereas, what's actually required in code is "(Last 4 Digits): " followed quickly by a 4 digit number

p = re.compile(r"""\(Last 4 Digits\):\s+(\d{4})""")

Could "()" be made optional in that regex ?
p = re.compile(r"""\(?Last 4 Digits\)?:\s+(\d{4})""")

Could the README state that ": " is required?
event description contains "(Last 4 Digits): " or "Last 4 Digits: " followed by a 4 digit number

Regards,

Expired entities are dropped based upon midnight of HA not TZ

When an entity is configured with a timezone that is different from HA (aka local) the entity tracking continues to follow the local TZ for when it should be dropped at midnight. This can cause issues if the configured TZ of the calendar is far enough west of HA instance

Integration Smoobu ?

First of all, thank you for your work.
I have been using it for several months to manage my reservations on AirBnb.
I have a request for an improvement :-)
Would it be possible to integrate the booking calendar of smoobu.com? (It is a company that integrates all booking portals)
It looks exactly like airBnb and I can easily provide you with the link to look at the ical file data.
Thank you very much for your answer.

Option for check-in/out for code generation

It would be good to give more options for code slot generation.

At present, we expect the last 4 digits of a phone number in the calendar entry the way that AirBnB provides it. VRBO apparently does not provide anything like this so we should provide an option for an alternative code generator (or more?)

ETA is a bit wonky

The ETA attribute of the sensors is currently rather wonky.

It shows 1 on the day of check-in, 0 on the first day after check-in, and a negative number for each additional day past that.

This should be a proper count down and then go to None or not even be there after check-in.

Additionally, granularity can / should be upped with some ETAs in hours and minutes.

Mapping sensor not properly tracking changes to slots

The mapping sensor is not properly tracking current state of the slots. While it is currently expected to lag up to 30 seconds behind actual, it is not properly updating the mapping if a reservation moves to a different slot for some reason.

Errors getting calendars should be logged or notified

Presently the only time any failures to acquire the calendar are logged are if the logging level of the integration is at debug or greater. A persistent notification should be created when there are issues with getting the calendar. It should automatically be cleared when the calendar is again reachable.

Additionally, there should be logs marked for these events.

Provide a way for generated codes to be a customizable length

Code generation is currently set to only generate 4 digit PINs. Some locks may require longer PIN lengths to operate. This should be a configurable option.

Known caveats: phone code generation would have to be ignored as all calendars that have been inspected that provide any phone information restrict it to the last 4 digits.

In/Out based generation would likely need to be rethought given the current implementation.

Random generation would just need to have the digit count extended.

Errors in getting calendar on startup can delete lock slots

Currently calendars are not cached at all. This means that if the providing service is unavailable when the integration or HA is restarted then the calendar gets purged. This can potentially cause lock slots to be cleared and possibly lock out a guest

Only AirBnB iCalendars are supported

I went to change the timezone of my two calendars which were working fine.
Amended airbnb no problem, just selected the timezone from the list and submitted, no other items touched.
Amending my Tripadvisor calendar's timezone and the message above popped up. Actually I'm unable to 'submit' even without making any change.

Keymaster lock of (none) does handle failure well

When the Keymaster lock is set to (none) during config validation if there is an error then the re-returned form is set to the Blank option which if not noticed by the end user will cause a different error on the next form validation.

Manage lock codes based on sensors

The lock codes need to be properly updated when the sensors change

  • #35
  • Update the found slot with the reservation code and combination
  • Clear old codes after the sensor item for it goes away

Generic calendars should be supported in some way

Currently a generic calendar (such as a google calendar) causes the integration to fail if the events on the calendar do not conform to one of the currently supported platforms. There should be a way to make this fall through sanely for generic calendars.

Make Keymaster an optional dependency

There is a desire to use the integration just for the calendaring configuration that allows for setting checkin/checkout on the calendar objects along with the sensors.

Keymaster slots do not fully track date range changes

It is possible that a date change will not be properly picked up by managed door slots. In theory they should self-correct at the midnight roll-over expiration of events. While this is true there is still the problem of the checkout time happening earlier in the day and the lock then becoming unavailable for potentially several hours before it corrects itself at midnight

Slots moved which breaks kwikset managed z-wave locks

First off I love this integration. I love it so much I'm here to figure out how to keep using it. I have a smartcode 888 kwikset lock managed by keymaster. It's working with the airbnb calendar for me well. I have it managing slots 5-10. I have it configured with 5 door sensors.

Well about 12:18am one of my guests got locked out due to something strange happening here. Luckily someone else was inside and everything was fine.

What I noticed in the logbook was that right around then rental control "moved" the slots assigned to the different calendars. Specifically slot 5 was in-use and my current reservation was in that slot, but then around 12:18am it got moved to slot 6 somehow and I think all the other ones (there are only 4 reservations) also got moved.

So what happens with the kwikset is that if you try to assign it a code that it already has it won't "assign" it gets stuck at "Adding". This isn't keymaster or rental control's fault at all, but it's the way it is. I'm pretty sure when the shifting happened the moving of the code from slot 5 to slot 6 either happened out of order or very close to each other such that it was removed from slot 5 correctly, but it failed to actually add to slot 6. It was set to "enabled" so I'm not sure what more rental control could have done, according it the job was done as expected.

I'm mainly here with questions both in terms of what happened and what I could do about it in the future.

  • What would cause this slot shift event and why at 12:18am?
  • Is this something that could be improved? I have no insight into why this happened so I'm very unsure of this.
  • How could I limit rental control from making code changes to just say between the hours of 10am and 8pm that way at least I'd be online when it happens. I wrote an automation to notify me of the stuck lock so I just need to be awake to see it.
  • Would I maybe avoid the problem by adjusting the number of event sensors to create from 5 to 1? I only have one reservation per day ever.

Let me know if there is anything I can provide to help out.

Get into default HACS

Release v0.5 is finally out. Should attempt to get added as a default via HACS so that people don't have to custom add the repository.

Booking.com request

Hi!

First I want to thank you for a great integration! I have my property on both booking and Airbnb but it seems that there are issues using this integration with Booking - is there any plans on adding booking as a supported vendor?

Thanks ๐Ÿ™๐Ÿ™‚

Upgrading to v0.7.5 is not very clean

During a test upgrade from v0.7.2 -> v0.7.5-beta it was discovered that the integration has a major issue properly picking up the new package path configuration option. This causes issues with the generation of the automation files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.