esphome / esphome/feature-requests

Add methods to set sun parameters (latitude and longitude)

Open
#1,854 0 comments 0 reactions 0 assignees View on GitHub
component: sun
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**

I'd like the sun component to have 2 methods such as sun.set_latitude(x) and sun.set_longitude(x) to be able to set those parameters during runtime and not only hard coded.

**Please describe your use case for this integration and alternatives you've tried:**

I'd like to use the sun component in combination with a GPS module to control a hen house door based on sun rises / sunset.
The hen house is far from the wifi and have unconsistant connection.
I'd like to rely on GPS time sync and location for the sun component.
I'd like the sun component to have it's parameters editable by code so the final product can be self adaptable to it's actual location without having to manually update GPS coordinates and re-flash the ESP (thanks to a GPS receiver).

**Additional context**

NA

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the sun component and its latitude and longitude configuration, then trace how those values are used for sunrise and sunset calculations. Define the runtime behavior for setting both parameters and verify that subsequent calculations use the updated location; the issue names no tests or files to run.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.