home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
68.71k stars 28.04k forks source link

Aurora integration casts longitude and latitude to integer. #100817

Open j-dohnalek opened 7 months ago

j-dohnalek commented 7 months ago

The problem

The float for latitude and longitude are forced to be integers causing sending request for invalid position requested by the user.

The code at this file:

https://github.com/home-assistant/core/blob/b9e8566608d68a3d8fc9407a351ec4469675bdda/homeassistant/components/aurora/coordinator.py#L38

self.latitude = int(latitude)
self.longitude = int(longitude)

should be

self.latitude = float(latitude)
self.longitude = float(longitude)

What version of Home Assistant Core has the issue?

2023.9.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Aurora

Link to integration documentation on our website

https://www.home-assistant.io/integrations/aurora

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 7 months ago

Hey there @djtimca, mind taking a look at this issue as it has been labeled with an integration (aurora) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `aurora` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign aurora` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


aurora documentation aurora source (message by IssueLinks)

AKHwyJunkie commented 4 months ago

I just wanted to throw in my support (and experience) regarding this issue. One of the biggest Aurora destinations in the US is Fairbanks, AK, approximately 64.9N. Currently, the integration rounds the latitude down, regardless of the float value. Either proper integer rounding or float values would treat this more appropriately for Aurora purposes. The typical active aurora band can range from partial degrees to multiple degrees of latitude, meaning this can inherently affect accuracy.

emackinnon1 commented 3 months ago

I also will throw in my support for this. I am happy to open a PR for this once I get this repo pulled down and set up (it may be a week or so until I get around to it), but if anyone wanted to do so in the meantime, it looks like several PRs have been accepted and merged in for this integration recently.

issue-triage-workflows[bot] commented 1 week ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

j-dohnalek commented 1 week ago

No fix have been applied as of yet.

Dev branch:

https://github.com/home-assistant/core/blob/dev/homeassistant/components/aurora/coordinator.py

Neither in the last release:

https://github.com/home-assistant/core/blob/2024.4.3/homeassistant/components/aurora/coordinator.py