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

Add new launch sensor to keep track of space launches. #18274

Merged
merged 7 commits into from
Nov 8, 2018
Merged

Add new launch sensor to keep track of space launches. #18274

merged 7 commits into from
Nov 8, 2018

Conversation

ludeeus
Copy link
Member

@ludeeus ludeeus commented Nov 6, 2018

Description:

Adda a new sensor to show the next upcoming space launch 🚀

image

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#7397

Example entry for configuration.yaml (if applicable):

sensor:
  platform: launch

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

Copy link
Member

@fabaff fabaff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should throttle the sensor by default. Maybe something like 10 or 15 min. The data is pretty static and there seems to be no need to poll with the default interval.

@ludeeus ludeeus changed the title Add new launch sensor to keep track of space launches. WIP: Add new launch sensor to keep track of space launches. Nov 7, 2018
@ludeeus
Copy link
Member Author

ludeeus commented Nov 7, 2018

I will add that @fabaff and also make the package reuse the aiohttp session from homeassistant as mentioned here: #18237 (comment)

@balloob
Copy link
Member

balloob commented Nov 7, 2018

10 or 15 minutes? What about 24 hours? This is very static info…

@ludeeus
Copy link
Member Author

ludeeus commented Nov 7, 2018

Some days have multiple launches, my plan was to set it to 1-hour intervals

@amelchio
Copy link
Contributor

amelchio commented Nov 7, 2018

I guess the launch_time could be used for some custom polling? Maybe not worth it ...

@ludeeus ludeeus changed the title WIP: Add new launch sensor to keep track of space launches. Add new launch sensor to keep track of space launches. Nov 7, 2018
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some style things.

homeassistant/components/sensor/launch.py Outdated Show resolved Hide resolved
homeassistant/components/sensor/launch.py Outdated Show resolved Hide resolved
Copy link
Contributor

@amelchio amelchio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ready to fly!

@fabaff fabaff merged commit fd2987e into home-assistant:dev Nov 8, 2018
@ghost ghost removed the in progress label Nov 8, 2018
@balloob
Copy link
Member

balloob commented Nov 8, 2018

Soo, would people agree that this name is a bit too generic ?

@balloob
Copy link
Member

balloob commented Nov 8, 2018

I would think that launch_library would be a better name, as it reflects the name of the service.

@ludeeus
Copy link
Member Author

ludeeus commented Nov 8, 2018

@balloob I do not disagree with that do you want me to make a PR to change it?

@ludeeus ludeeus deleted the launch branch November 8, 2018 17:05
@balloob
Copy link
Member

balloob commented Nov 9, 2018

Yes let's do it to before it is released

@ludeeus
Copy link
Member Author

ludeeus commented Nov 9, 2018

I'll start that now :)

@HemiBob
Copy link

HemiBob commented Apr 23, 2020

I would like to build a countdown sensor and it would be very useful if this launch sensor had an attribute based on the "wsstamp" field. IE the unix formatted window start time.
Then it would be a simple matter to subtract the timestamp now() value and convert to days, hours. minutes etc.

@frenck
Copy link
Member

frenck commented Apr 23, 2020

@HemiBob Please don't use closed/merged pull requests for seeking help/support/feature requests.

For the right place see: https://www.home-assistant.io/help

@home-assistant home-assistant locked and limited conversation to collaborators Apr 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants