Skip to content

Commit

Permalink
Merge pull request #90 from covid10/master
Browse files Browse the repository at this point in the history
Fix device_state_attributes warnings and norwegian translation
  • Loading branch information
Hellowlol authored Dec 30, 2021
2 parents 685e726 + 3f43560 commit 5f1a4ef
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
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"
}
}
}

0 comments on commit 5f1a4ef

Please sign in to comment.