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

Add Power Attribute to Sensor #4

Closed
wants to merge 1 commit into from
Closed

Conversation

ad-ha
Copy link
Contributor

@ad-ha ad-ha commented May 3, 2022

Adding the power retrieved from the last reading as an attribute to the sensor. This implementation (instead of a separate sensor) does not require an additional query to the REST API

TO-DO:

  • Change the attribute name to incorporate into translation
  • Set a standard name for templating
  • Add Units (currently value is retrieved in W)

Adding the power retrieved from the last reading as an attribute to the sensor. This implementation (instead of a separate sensor) does not require an additional query to the REST API

TO-DO: 
* Change the attribute name to incorporate into translation 
* Set a standard name for templating
@ad-ha
Copy link
Contributor Author

ad-ha commented May 3, 2022

Esto sería el resultado final después de añadir este atributo:

image

Y con templating (con el código actual) se podría sacar un sensor separado:

{{ state_attr('sensor.i_de_es002xxxxxx_accumulated', 'Last Power Reading') }};

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

Successfully merging this pull request may close these issues.

None yet

2 participants