mirror of
https://github.com/Dielee/volvo2mqtt.git
synced 2026-08-13 03:09:52 +02:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25e90091ab | ||
|
|
c4c801e46a | ||
|
|
8326ed3c88 | ||
|
|
3166a1c6ab | ||
|
|
80646bbf51 | ||
|
|
7401ebfc53 | ||
|
|
bdbb6bd5f8 |
@@ -15,6 +15,8 @@ Maybe this component works also with other Volvo cars. Please try out the native
|
|||||||
|
|
||||||
Home Assistant thread can be found [here](https://community.home-assistant.io/t/volvo2mqtt-connect-your-aaos-volvo/585699).
|
Home Assistant thread can be found [here](https://community.home-assistant.io/t/volvo2mqtt-connect-your-aaos-volvo/585699).
|
||||||
|
|
||||||
|
<b>Important note: The Volvo api currently ONLY works in these [countries](https://developer.volvocars.com/terms-and-conditions/apis-supported-locations/)</b>
|
||||||
|
|
||||||
If you like my work:<br>
|
If you like my work:<br>
|
||||||
[](https://ko-fi.com/U7U8MFXCF)
|
[](https://ko-fi.com/U7U8MFXCF)
|
||||||
|
|
||||||
@@ -34,6 +36,7 @@ If you like my work:<br>
|
|||||||
- XC90 PHEV T8 (2024)
|
- XC90 PHEV T8 (2024)
|
||||||
- XC90 B5 Mildhybrid (2024)
|
- XC90 B5 Mildhybrid (2024)
|
||||||
- V90 PHEV T8 (2019)*
|
- V90 PHEV T8 (2019)*
|
||||||
|
- V90 PHEV T6 (2024)
|
||||||
|
|
||||||
*only partly working
|
*only partly working
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
## v1.8.21
|
||||||
|
### 🐛 Bug Fixes:
|
||||||
|
|
||||||
|
- Try to fix addon build #146
|
||||||
|
|
||||||
|
## v1.8.20
|
||||||
|
### 🐛 Bug Fixes:
|
||||||
|
|
||||||
|
- Fix Addon crash if icon state is `UNKOWN`
|
||||||
|
- Add `UNSPECIFIED` state for windows
|
||||||
|
|
||||||
|
|
||||||
## v1.8.19
|
## v1.8.19
|
||||||
### 🐛 Bug Fixes:
|
### 🐛 Bug Fixes:
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ WORKDIR /volvoAAOS2mqtt
|
|||||||
RUN wget --no-cache https://raw.githubusercontent.com/Dielee/volvo2mqtt/main/requirements.txt
|
RUN wget --no-cache https://raw.githubusercontent.com/Dielee/volvo2mqtt/main/requirements.txt
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt --break-system-packages
|
||||||
|
|
||||||
# copy the content of the local src directory to the working directory
|
# copy the content of the local src directory to the working directory
|
||||||
COPY / .
|
COPY / .
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
name: "Volvo2Mqtt"
|
name: "Volvo2Mqtt"
|
||||||
description: "Volvo AAOS MQTT bridge"
|
description: "Volvo AAOS MQTT bridge"
|
||||||
version: "1.8.19"
|
version: "1.8.21"
|
||||||
slug: "volvo2mqtt"
|
slug: "volvo2mqtt"
|
||||||
init: false
|
init: false
|
||||||
url: "https://github.com/Dielee/volvo2mqtt"
|
url: "https://github.com/Dielee/volvo2mqtt"
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
from config import settings
|
from config import settings
|
||||||
|
|
||||||
VERSION = "v1.8.19"
|
VERSION = "v1.8.21"
|
||||||
|
|
||||||
OAUTH_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
|
OAUTH_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
|
||||||
VEHICLES_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles"
|
VEHICLES_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles"
|
||||||
@@ -50,7 +50,7 @@ charging_connection_states = {"CONNECTION_STATUS_DISCONNECTED": "Disconnected",
|
|||||||
"CONNECTION_STATUS_CONNECTED_DC": "Connected DC", "CONNECTION_STATUS_CONNECTED_AC": "Connected AC",
|
"CONNECTION_STATUS_CONNECTED_DC": "Connected DC", "CONNECTION_STATUS_CONNECTED_AC": "Connected AC",
|
||||||
"CONNECTION_STATUS_FAULT": "Fault"}
|
"CONNECTION_STATUS_FAULT": "Fault"}
|
||||||
|
|
||||||
window_states = {"CLOSED": "OFF", "OPEN": "ON", "AJAR": "ON"}
|
window_states = {"CLOSED": "OFF", "OPEN": "ON", "UNSPECIFIED": "UNKNOWN", "AJAR": "ON"}
|
||||||
door_states = {"CLOSED": "OFF", "OPEN": "ON", "UNSPECIFIED": "UNKNOWN", "AJAR": "ON"}
|
door_states = {"CLOSED": "OFF", "OPEN": "ON", "UNSPECIFIED": "UNKNOWN", "AJAR": "ON"}
|
||||||
engine_states = {"RUNNING": "ON", "STOPPED": "OFF", "true": "ON", "false": "OFF"}
|
engine_states = {"RUNNING": "ON", "STOPPED": "OFF", "true": "ON", "false": "OFF"}
|
||||||
|
|
||||||
|
|||||||
+12
-9
@@ -269,16 +269,19 @@ def update_car_data(force_update=False, overwrite={}):
|
|||||||
|
|
||||||
def update_ha_device(entity, vin, state):
|
def update_ha_device(entity, vin, state):
|
||||||
icon_config = icon_states.get(entity["id"])
|
icon_config = icon_states.get(entity["id"])
|
||||||
if icon_config and state:
|
try:
|
||||||
logging.debug("Entity " + entity["id"] + " state " + str(state))
|
if icon_config and state:
|
||||||
if isinstance(state, float):
|
logging.debug("Entity " + entity["id"] + " state " + str(state))
|
||||||
icon = util.get_icon_between(icon_config, state)
|
if isinstance(state, float):
|
||||||
elif state.replace(".", "").isnumeric():
|
icon = util.get_icon_between(icon_config, state)
|
||||||
state = float(state)
|
elif state.replace(".", "").isnumeric():
|
||||||
icon = util.get_icon_between(icon_config, state)
|
state = float(state)
|
||||||
|
icon = util.get_icon_between(icon_config, state)
|
||||||
|
else:
|
||||||
|
icon = icon_config[state]
|
||||||
else:
|
else:
|
||||||
icon = icon_config[state]
|
return None
|
||||||
else:
|
except:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
logging.debug("Updating icon to " + icon + " for " + entity["id"])
|
logging.debug("Updating icon to " + icon + " for " + entity["id"])
|
||||||
|
|||||||
Reference in New Issue
Block a user