# HassBle Configuration File # # Host this config.yaml file in a Git repository (e.g., GitHub) and enter the RAW URL in the HassBle Android app. # The app will download this configuration, decode BLE advertisements/sensors, and declare/update them in Home Assistant. # # Do NOT put any Home Assistant credentials (URL/Token) in this file. Enter them directly in the app. version: 1 defaults: publish: on_change_only: true min_interval: 10s devices: # ────────────────────────────────────────────────────────────── # Path A: BLE Passive Scanning (Advertisements) # ────────────────────────────────────────────────────────────── - id: living_thermo name: "Living Room Thermometer" source: advertisement match: service_data_uuid: "181a" sensors: - key: temperature device_class: temperature unit: "°C" state_class: measurement source_field: service_data decode: { offset: 6, length: 2, type: int16, endian: big, scale: 0.1 } - key: humidity device_class: humidity unit: "%" state_class: measurement source_field: service_data decode: { offset: 8, length: 1, type: uint8 } - key: battery device_class: battery unit: "%" source_field: service_data decode: { offset: 9, length: 1, type: uint8 } # ────────────────────────────────────────────────────────────── # Path C: OBD (ELM327) over BLE # ────────────────────────────────────────────────────────────── - id: car_obd name: "Vehicle OBD" source: obd obd: service_uuid: "18F0" tx_char_uuid: "2AF1" rx_char_uuid: "2AF0" tx_delay: 50ms init_commands: - "ATZ" - "ATE0" - "ATL0" - "ATS0" - "ATH0" - "ATSP6" sensors: - { key: rpm, preset: rpm, update_interval: 1s } - { key: speed, preset: speed, update_interval: 1s } - { key: engine_load, preset: engine_load, update_interval: 1s } - { key: throttle, preset: throttle, update_interval: 1s } - { key: coolant_temp, preset: coolant_temp, update_interval: 10s } - { key: intake_temp, preset: intake_air_temp, update_interval: 10s } - { key: ambient_temp, preset: ambient_temp, update_interval: 30s } - { key: battery, preset: battery_voltage, update_interval: 10s } - { key: run_time, preset: run_time, update_interval: 5s } - { key: odometer, preset: odometer, update_interval: 30s } - key: fuel_level preset: fuel_level update_interval: 30s publish: deadband: 0.5 min_interval: 60s # GM Extensions (mode 22) - { key: gear, preset: gm_current_gear, update_interval: 1s } - { key: prnd, preset: gm_prnd_status_alt, update_interval: 1s } - { key: torque, preset: actual_torque, update_interval: 1s } - { key: oil_pressure, preset: gm_oil_pressure, update_interval: 2s } - { key: trans_temp, preset: gm_trans_temp, update_interval: 10s } # ────────────────────────────────────────────────────────────── # Path B: GATT Notify & Write (Bi-directional Control) # ────────────────────────────────────────────────────────────── - id: custom_meter name: "Custom BLE Meter" source: gatt_notify gatt: service_uuid: "ffe0" notify_char_uuid: "ffe1" write_char_uuid: "ffe2" sensors: - key: power unit: "W" device_class: power state_class: measurement decode: { offset: 0, length: 2, type: uint16, endian: little } controls: - key: relay type: switch command: { on: "A10100", off: "A10000" }