yeah, my bad…i’d updated the integration but not restarted home assistant as i got distracted.
apologies
Hi TobiasBlo
Yes, would be grea if you could share your automation content for that Export
Thanks
Hi all,
I’m not able to toggle my ignition, doors (lock/unlock) & the heater. I have no clue what is going wrong, logs aren’t telling anything.
This is my pop-up code (front-end):
- type: horizontal-stack
cards:
- type: 'custom:button-card'
entity: switch.mercedes_ac
style: |
ha-card {
border-radius: 5px;
background-color: #262628;
--paper-item-icon-active-color': 'rgb(245,25,25)
}
tap_action:
confirmation: Are you sure ?
action: toggle
show_state: false
show_label: false
show_name: false
- type: 'custom:button-card'
entity: switch.mercedes_ignition
style: |
ha-card {
border-radius: 5px;
background-color: #262628;
--paper-item-icon-active-color': 'rgb(245,25,25)
}
tap_action:
confirmation: Are you sure ?
action: toggle
show_state: false
show_label: false
show_name: false
- type: 'custom:button-card'
entity: switch.mercedes_lock
style: |
ha-card {
border-radius: 5px;
background-color: #262628;
'--paper-item-icon-active-color': 'rgb(245,25,25)'
}
tap_action:
confirmation: Are you sure ?
action: toggle
show_state: false
show_label: false
show_name: false
type or paste code here
and here is my switch config:
- platform: template
switches:
mercedes_ac:
value_template: "{{ is_state('input_boolean.fake_state_ac', 'on') }}"
turn_on:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.fake_state_ac
- service: script.turn_on
target:
entity_id: script.clima_on
turn_off:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.fake_state_ac
- service: script.turn_on
entity_id: script.clima_off
icon_template: '{%- if is_state("switch.mercedes_ac", "on") %}mdi:radiator{% else %}mdi:radiator-off{%- endif %}'
mercedes_lock:
value_template: "{{ is_state('input_boolean.fake_state_lock', 'on') }}"
turn_on:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.fake_state_lock
- service: script.turn_on
target:
entity_id: script.carlock_open
turn_off:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.fake_state_lock
- service: script.turn_on
target:
entity_id: script.carlock_lock
icon_template: '{%- if is_state("sensor.2_amu_833_lock", "0") %}mdi:car-door{% else %}mdi:car-door-lock{%- endif %}'
#ensor.my_car_lock_status", "on") %}mdi:car-door{% else %}mdi:car-door-lock{%- endif %}'
mercedes_ignition:
value_template: "{{ is_state('input_boolean.fake_state_ignition', 'on') }}"
turn_on:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.fake_state_ignition
- service: script.turn_on
target:
entity_id: script.ignition_on
turn_off:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.fake_state_ignition
- service: script.turn_on
target:
entity_id: script.ignition_off
icon_template: '{%- if is_state("switch.mercedes_ignition", "on") %}mdi:engine-outline{% else %}mdi:engine-outline-off{%- endif %}'
Has anyone got any clue what I’m doing wrong ?
Thanks a lot in advance,
Kr,
Bart
Hi, I really tried solving this on my own but I can’t for the life of me figure it out. I had everything working then about a month ago I noticed all my entities were overwritten back to default. It doesn’t matter how many times I update them if I restart home assistant they update to the original entity names and my configurations won’t work. I’m just replacing the VIN with C43 as I have always done but for some reason they just keep getting overwritten. Thoughts?
I can’t seem to control the AuxHeat through the integration. I have a Switch and can click on it and but turns off directly. Anybody has the same ?
It’s not an entity that can be directly switched in HA. It requires a service call.
Thanks, will check it out
Anyone have any idea why this is happening? I don’t think I changed anything as this was working for several months and suddenly would reset every time I restarted.
Hi,
does your car support the AuxHeater (secondary heater) or do you have PreClimateControl in your car? The switch is for AuxHeater only.
Enable the debug log of the component to check for errors.
BR
Rene
Hi @jackgithome ,
could you share some more details?
What is your HA version?
What is your MBAPI2020 version?
What is your region?
How do you change the entity names?
Is the vin stable or does it change after restart?
BR
Rene
I have HA version 2021.12.9
MBAPI V 0.6.0
Region US
I update entities by going into the configuration menu - > Devices and services → clicking on the 17 entities in the MBAPI integration ->click on 1 of the names/entities → then remove the VIN and replace it with c43.
I restarted and noted the VIN, it appears to stay the same.
Thanks!
Anyone please ?
Hi,
Looks like I have added a bug/feature that affects the US-region only. There was one feature request to remove old cars from the config and I have implemented this in v0.6. This removal runs potentially to early for the US-region.
Do you see “Removing car from device registry: …” in your log (log level: info)?
BR
Rene
Hi,
sure, I can - but could please simplify it first a little bit and explain what you are trying to achieve. In case you have problems with the switches then please test it without all this custom lovelace stuff first and let us work on one switch only. Please add the code of the related input_helper too.
BR
Rene
New Release v0.6.1
Bugfix:
- (US-Region) Cars get deleted from device registry (see) (@jackgithome thanks for reporting)
- (US-Region) Sensors are not created after first setup (see) (@JonathanJCasey thanks for your help, I’ll improve it step by step)
Add:
- New sensor “Charging Power” (was and still is an attribute) - Prep for Energy Dashboard support in one of the following releases
Hi Rene,
First of all thanks big time for your help. What I want to achieve is to be able to start my heater in my MB using Home assistant. I have a button that gives me the state of my mercedes (locked versus unlocked) and by pressing the button I get a pop-up with the visuals of the Mercedes Benz state (the one with the car and all the sensors) and also 3 buttons
- lock / unlock
- start ignition
- start heater
Let’s indeed start with one button: the one to start of stop the heater.
First of all, I created an input_boolean as follows:
fake_state_ac:
name: status clima
Second of all, I created a switch:
- platform: template
switches:
mercedes_ac:
value_template: "{{ is_state('input_boolean.fake_state_ac', 'on') }}"
turn_on:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.fake_state_ac
- service: script.turn_on
target:
entity_id: script.mercedes_ac_on
turn_off:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.fake_state_ac
- service: script.turn_on
entity_id: script.mercedes_ac_off
icon_template: '{%- if is_state("switch.2_amu_833_auxheat", "on") %}mdi:radiator{% else %}mdi:radiator-off{%- endif %}'
The scripts AC ON/OFF are declared as follows in my scripts.yaml file:
mercedes_ac_on:
alias: Start MB Heater
sequence:
- service: mbapi2020.auxheat_start
data:
vin: W1N1673171A316237
mercedes_ac_off:
alias: Start MB Heater
sequence:
- service: mbapi2020.auxheat_stop
data:
vin: W1N1673171A316237
And of course, a button in my pop-up:
- type: horizontal-stack
cards:
- type: 'custom:button-card'
entity: switch.mercedes_ac
style: |
ha-card {
border-radius: 5px;
background-color: #262628;
--paper-item-icon-active-color': 'rgb(245,25,25)
}
tap_action:
confirmation: Are you sure ?
action: toggle
show_state: false
show_label: false
show_name: false
But somehow, it doesn’t work, and I can’t point where the failure is…
Thanks in advance for your help !
Kr,
Bart
Does the switch work outside of your custom lovelace card?
My switch from the mbapi2020 integration jumps off 2s after I put it on
My switch I created stays on but nothing happens
ok, let us focus on this first. Does the service work? What happens when you call the AUXHEAT_Start service? To keep the noise in thread low we can jump to private messaging too and just show the final result.