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

Adding prices by hour #94

Closed
angoyd opened this issue Oct 8, 2020 · 2 comments
Closed

Adding prices by hour #94

angoyd opened this issue Oct 8, 2020 · 2 comments

Comments

@angoyd
Copy link

angoyd commented Oct 8, 2020

Any chance of adding the prices of today and to tomorrow to the sensor in HomeAssistant, today I´m fetching them via an rest sensor, and then displaying them in an custom Lovelace chart card.

The Restsensor set up looks like this today

 - platform: rest
    name: Tibber Price
    resource: https://api.tibber.com/v1-beta/gql
    method: POST
    payload: '{ "query": "{viewer {homes {currentSubscription {priceInfo {today {total} tomorrow {total}}}}}}"}'
    headers:
      Authorization: "Bearer <token>"
      User-Agent: Home Assistant
      Content-Type: application/json
    json_attributes_path: "$.data.viewer.homes[0].currentSubscription.priceInfo"
    json_attributes:
      - today
      - tomorrow
    scan_interval: 14400
    value_template: 'OK'

And then I display it in my custom lovelace card found here https://github.com/angoyd/hass-things/tree/main/tibber-card.

But it would have been nice not to have to setup an extra rest sensor to get the prices over the day, also its and extra call for the tibber api.

@Danielhiversen
Copy link
Owner

Home Assistant does not allow future values to be added to a sensor: home-assistant/architecture#15

@angoyd
Copy link
Author

angoyd commented Oct 12, 2020

That´s too bad, I read the linked issue, and I must say I don´t realy see the problem.. Suppose I will have to continue with my rest sensor then...

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

No branches or pull requests

2 participants