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

Feature request: Ability to retrieve other items than temperature from weather/climate #56

Open
xatr0z opened this issue May 7, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request.

Comments

@xatr0z
Copy link

xatr0z commented May 7, 2021

Is your feature request related to a problem? Please describe.

Right now when a weather entity is included, it defaults to temperature.

Describe the solution you'd like

I would like it to default to the ATTR_UNIT_OF_MEASUREMENT from the other entities included. This would be useful for me; i want to have a baseline of the humidity in my location using my own sensors and the humidity reported from my weather service.

An alternative would be a new variable by which i can define the attribute which should be included.

Describe alternatives you've considered

For now I'll make an temporary template sensor for extracting the humidty from the weather sensor.

Additional context

@xatr0z xatr0z added the enhancement New feature or request. label May 7, 2021
@Limych Limych self-assigned this May 7, 2021
@GoSpursGoNL
Copy link

GoSpursGoNL commented May 10, 2021

This integration looks at the state of an entity and for weather integrations the temperature is in the state.
I think you'd best create a template sensor in HA that you let read the value of a certain attribute, and use that new entity for this custom integration.

However, whilst reading this, I stubled across this https://www.home-assistant.io/integrations/template/#state-based-template-sensors and I'm now starting to wonder what is the difference with this ha-average custom integration?
/edit: to answer my own question: I see this custom integration takes into account which weather integrations are actually available, whilst with the above link, if f.i. 2 out of 4 are available, and 2 give unknown, f.i. still for some time after startup, the average is incorrectly calculated.

Limych pushed a commit that referenced this issue Jun 15, 2021
@FauthD
Copy link

FauthD commented Apr 6, 2022

Why not simply adding "unit_of_measurement:" as attribute like other sensors do?

@cnaslain
Copy link

cnaslain commented Jun 12, 2022

+1
I've created an average sensor using the temperature of 4 RAID disks. When I try to create a graph combining the room temperature and the RAID disk avg temperature, it shows two separated graphs. The temperature chart of the avg one has no temperature unit (others sensors have the correct unit).
Having the ability to add the unit using a "unit_of_measurement" attribute would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

5 participants