Skip to content

Configurable time format in ForecastSolar class#330

Open
hslabbert wants to merge 1 commit into
home-assistant-libs:masterfrom
hslabbert:day_estimate_time
Open

Configurable time format in ForecastSolar class#330
hslabbert wants to merge 1 commit into
home-assistant-libs:masterfrom
hslabbert:day_estimate_time

Conversation

@hslabbert

Copy link
Copy Markdown

Permits setting the time format per https://doc.forecast.solar/doku.php?id=api#time

Related to #294

Default time format of utc is maintained. This merely permits the user to specify the time format to use rather than hard coding utc.

@klaasnicolaas klaasnicolaas added the new-feature New features or request. label Apr 18, 2026
@hslabbert

Copy link
Copy Markdown
Author

Is the codecov path level check a key one here? I.e. would that be blocking getting this merged, or more of a "good to have"? I've held off on adding tests for each possible time format option here as on first glance it would make the fixtures a fair bit bigger with additional expected outputs, but if it's a hard requirement I can plan to put time against scaffolding that out.

@klaasnicolaas

Copy link
Copy Markdown
Contributor

Yes, you need to add tests so that the extra lines of code are also tested.

./Klaas

@hslabbert

Copy link
Copy Markdown
Author

Righto; I'll try to put some time against that over the next while. It might be a bit before I can slot that in, but will plug away at it.

@klaasnicolaas

Copy link
Copy Markdown
Contributor

You don't have to do anything complex; it's just testing with the time parameter in the request. There are plenty of other tests you can copy from.

./Klaas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature New features or request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants