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 raw value combination #346

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions custom_components/nordpool/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ def extra_state_attributes(self) -> dict:
"tomorrow_valid": self.tomorrow_valid,
"raw_today": self.raw_today,
"raw_tomorrow": self.raw_tomorrow,
"raw_combined": self.raw_combined,
"current_price": self.current_price,
"additional_costs_current_hour": self.additional_costs,
"price_in_cents": self._use_cents,
Expand All @@ -445,6 +446,13 @@ def raw_today(self) -> list:
def raw_tomorrow(self) -> list:
"""Raw tomorrow"""
return self._add_raw(self._data_tomorrow)

@property
def raw_combined(self) -> list:
"""Raw combined """
if (self.tomorrow_valid):
return(self.raw_today + self.raw_tomorrow)
return(self.raw_today)

@property
def tomorrow_valid(self) -> bool:
Expand Down