Skip to content

Commit

Permalink
Add parking and brakes binary sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
turbulator committed Jan 3, 2023
1 parent 4771b19 commit 0c9fbe5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
| binary_sensor.`PANDORA_ID`_right_back_door | Правая задняя дверь | открыта / закрыта |
| binary_sensor.`PANDORA_ID`_trunk | Багажник | открыт / закрыт |
| binary_sensor.`PANDORA_ID`_hood | Капот | открыт / закрыт |
| binary_sensor.`PANDORA_ID`_parking | Стояночный тормоз (МКПП) или Parking (АКПП) | |
| binary_sensor.`PANDORA_ID`_brakes | Педаль тормоза | нажата / отпущена |

## Команды

Expand Down
16 changes: 16 additions & 0 deletions custom_components/pandora_cas/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,22 @@
ATTR_SHIFT_BITS: 29,
ATTR_INVERSE: 0,
},
"parking": {
ATTR_NAME: "parking",
ATTR_ICON: "mdi:car-brake-parking",
ATTR_DEVICE_CLASS: None,
ATTR_DEVICE_ATTR: "bit_state_1",
ATTR_SHIFT_BITS: 27,
ATTR_INVERSE: 0,
},
"brakes": {
ATTR_NAME: "brakes",
ATTR_ICON: "mdi:car-brake-alert",
ATTR_DEVICE_CLASS: None,
ATTR_DEVICE_ATTR: "bit_state_1",
ATTR_SHIFT_BITS: 28,
ATTR_INVERSE: 0,
},
}


Expand Down

0 comments on commit 0c9fbe5

Please sign in to comment.