forked from peter/volvo2mqtt
Move object_id to default_entity_id for mqtt entities according to #312
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
### 🐛 Bug Fixes:
|
### 🐛 Bug Fixes:
|
||||||
|
|
||||||
- Fix missing charging system state `error` #314
|
- Fix missing charging system state `error` #314
|
||||||
|
- Move `object_id` to `default_entity_id` for mqtt entities according to #312
|
||||||
|
|
||||||
## v1.13.0
|
## v1.13.0
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -58,7 +58,7 @@ def create_otp_input():
|
|||||||
state_topic = otp_mqtt_topic + "/state"
|
state_topic = otp_mqtt_topic + "/state"
|
||||||
config = {
|
config = {
|
||||||
"name": "Volvo OTP",
|
"name": "Volvo OTP",
|
||||||
"object_id": "volvo_otp",
|
"default_entity_id": "volvo_otp",
|
||||||
"schema": "state",
|
"schema": "state",
|
||||||
"command_topic": otp_mqtt_topic,
|
"command_topic": otp_mqtt_topic,
|
||||||
"state_topic": state_topic,
|
"state_topic": state_topic,
|
||||||
@@ -95,7 +95,7 @@ def send_car_images(vin, data, device):
|
|||||||
image_topic = f"homeassistant/image/{vin}_{entity['id']}/image_topic"
|
image_topic = f"homeassistant/image/{vin}_{entity['id']}/image_topic"
|
||||||
config = {
|
config = {
|
||||||
"name": entity["name"],
|
"name": entity["name"],
|
||||||
"object_id": f"volvo_{vin}_{entity['id']}",
|
"default_entity_id": f"volvo_{vin}_{entity['id']}",
|
||||||
"schema": "state",
|
"schema": "state",
|
||||||
"icon": "mdi:image-area",
|
"icon": "mdi:image-area",
|
||||||
"content_type": "image/png",
|
"content_type": "image/png",
|
||||||
@@ -405,7 +405,7 @@ def update_ha_device(entity, vin, state):
|
|||||||
logging.debug("Updating icon to " + icon + " for " + entity["id"])
|
logging.debug("Updating icon to " + icon + " for " + entity["id"])
|
||||||
config = {
|
config = {
|
||||||
"name": entity['name'],
|
"name": entity['name'],
|
||||||
"object_id": f"volvo_{vin}_{entity['id']}",
|
"default_entity_id": f"volvo_{vin}_{entity['id']}",
|
||||||
"schema": "state",
|
"schema": "state",
|
||||||
"icon": f"mdi:{icon}" if icon else f"mdi:{entity['icon']}",
|
"icon": f"mdi:{icon}" if icon else f"mdi:{entity['icon']}",
|
||||||
"state_topic": f"homeassistant/{entity['domain']}/{vin}_{entity['id']}/state",
|
"state_topic": f"homeassistant/{entity['domain']}/{vin}_{entity['id']}/state",
|
||||||
@@ -446,7 +446,7 @@ def create_ha_devices():
|
|||||||
for entity in volvo.supported_endpoints[vin]:
|
for entity in volvo.supported_endpoints[vin]:
|
||||||
config = {
|
config = {
|
||||||
"name": entity['name'],
|
"name": entity['name'],
|
||||||
"object_id": f"volvo_{vin}_{entity['id']}",
|
"default_entity_id": f"volvo_{vin}_{entity['id']}",
|
||||||
"schema": "state",
|
"schema": "state",
|
||||||
"icon": f"mdi:{entity['icon']}",
|
"icon": f"mdi:{entity['icon']}",
|
||||||
"state_topic": f"homeassistant/{entity['domain']}/{vin}_{entity['id']}/state",
|
"state_topic": f"homeassistant/{entity['domain']}/{vin}_{entity['id']}/state",
|
||||||
|
|||||||
Reference in New Issue
Block a user