Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions homeassistant/components/volvooncall/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ class VolvoSensor(VolvoEntity, BinarySensorEntity):

@property
def is_on(self):
"""Return True if the binary sensor is on."""
return self.instrument.is_on
"""Return True if the binary sensor is on, but invert for the 'Door lock'."""
if self.instrument.attr == "is_locked":
return not self.instrument.is_on
else:
return self.instrument.is_on

@property
def device_class(self):
Expand Down