Skip to content

Commit

Permalink
Merge pull request #27 from dislabled/master
Browse files Browse the repository at this point in the history
  • Loading branch information
plmilord authored Jan 26, 2023
2 parents 4008162 + 3c8574d commit 77a4fe9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/spaclient/spaclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Import the device class from the component that you want to support
from .const import _LOGGER
from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT
from homeassistant.util.temperature import convert as convert_temperature
from homeassistant.util.unit_conversion import TemperatureConverter
from threading import Lock


Expand Down Expand Up @@ -730,7 +730,7 @@ def send_toggle_message(self, item):

async def set_temperature(self, temp):
if self.temp_scale == "Celsius":
temp = round(convert_temperature(temp, TEMP_FAHRENHEIT, TEMP_CELSIUS) * 2)
temp = round(TemperatureConverter.convert(temp, TEMP_FAHRENHEIT, TEMP_CELSIUS) * 2)
self.send_message(b'\x0a\xbf\x20', bytes([int(temp)]))

async def set_current_time(self):
Expand Down
29 changes: 29 additions & 0 deletions custom_components/spaclient/translations/nb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"config": {
"abort": {
"already_configured": "Enheten er allerede konfigurert"
},
"error": {
"cannot_connect": "Kunne ikke koble til, vennligst prøv igjen",
"unknown": "Ukjent feil"
},
"step": {
"user": {
"data": {
"host": "Vert",
"name": "Navn"
}
}
}
},
"options": {
"step": {
"init": {
"data": {
"scan_interval": "Avstemningsfrekvens for verdier (sekunder)",
"sync_time": "Hold Balboa BP kontrollerens tid synkronisert med Home Assistant"
}
}
}
}
}

0 comments on commit 77a4fe9

Please sign in to comment.