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

Fix device_state_attributes warnings and norwegian translation #90

Merged
merged 2 commits into from
Dec 30, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion custom_components/nordpool/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def tomorrow(self) -> list:
]

@property
def device_state_attributes(self) -> dict:
def extra_state_attributes(self) -> dict:
return {
"current_price": self.current_price,
"average": self._average,
Expand Down
25 changes: 25 additions & 0 deletions custom_components/nordpool/translations/nb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"config": {
"title": "Nordpool",
"step": {
"user": {
"title": "Nordpool Sensor",
"description": "Opprett en Nordpool sensor",
"data": {
"region": "Region",
"currency": "NOK",
"VAT": "Inkluder MVA",
"precision": "Antall desimaler som vises",
"low_price_cutoff": "Grense for lav-pris",
"price_in_cents": "Pris i cent",
"price_type": "Pris i format",
"additional_costs": "Mal for tilleggskostnader"
}
}
},
"error": {
"name_exists": "Navnet eksisterer allerede",
"invalid_template": "Malen inneholder feil, se https://github.com/custom-components/nordpool"
}
}
}