Skip to content

Add visibility and wind direction to weather template#47420

Closed
avee87 wants to merge 4 commits intohome-assistant:devfrom
avee87:weather-template
Closed

Add visibility and wind direction to weather template#47420
avee87 wants to merge 4 commits intohome-assistant:devfrom
avee87:weather-template

Conversation

@avee87
Copy link
Copy Markdown
Contributor

@avee87 avee87 commented Mar 4, 2021

Proposed change

Currently weather template doesn't support these attributes. They are useful, for instance, when you want to create a weather entity from multiple sources and show them in a rich weather card.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml
weather:
  - platform: template
    name: Composite Weather
    condition_template: "{{ states('weather.home') }}"
    temperature_template: "{{ states('sensor.outdoor_temperature') | float}}"
    humidity_template: "{{ states('sensor.outdoor_humidity') | float }}"
    pressure_template: "{{ states('sensor.outdoor_pressure') | float }}"
    forecast_template: "{{ state_attr('weather.home', 'forecast') }}"
    visibility_template: "{{ state_attr('weather.home', 'visibility') }}"
    wind_bearing_template: "{{ state_attr('weather.home', 'wind_bearing') }}"
    wind_speed_template: "{{ state_attr('weather.home', 'wind_speed') }}"

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

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

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@homeassistant
Copy link
Copy Markdown
Contributor

Hi @avee87,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@MartinHjelmare MartinHjelmare changed the title Added visibility and wind direction weather template Add visibility and wind direction to weather template Mar 4, 2021
@probot-home-assistant
Copy link
Copy Markdown

Hey there @PhracturedBlue, @tetienne, mind taking a look at this pull request as its been labeled with an integration (template) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

avee87 added a commit to avee87/home-assistant.io that referenced this pull request Mar 4, 2021
I'm adding new attributes so updating documentation accordingly: home-assistant/core#47420
avee87 added a commit to avee87/home-assistant.io that referenced this pull request Mar 5, 2021
I'm adding new configuration variables so updating documentation accordingly: home-assistant/core#47420
avee87 added a commit to avee87/home-assistant.io that referenced this pull request Mar 5, 2021
I'm adding new configuration variables so updating documentation accordingly: home-assistant/core#47420
avee87 added a commit to avee87/home-assistant.io that referenced this pull request Mar 5, 2021
I'm adding new configuration variables so updating documentation accordingly: home-assistant/core#47420
Copy link
Copy Markdown
Contributor

@dgomes dgomes left a comment

Choose a reason for hiding this comment

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

LGTM

@dgomes
Copy link
Copy Markdown
Contributor

dgomes commented Mar 10, 2021

#47736 is more extensive then this PR, we should focus in a single one

@dgomes
Copy link
Copy Markdown
Contributor

dgomes commented Mar 11, 2021

Can we close this one then ?

@avee87
Copy link
Copy Markdown
Contributor Author

avee87 commented Mar 11, 2021

Closing in favour of #47736

@avee87 avee87 closed this Mar 11, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2021
@avee87 avee87 deleted the weather-template branch January 2, 2022 00:57
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.

3 participants