Skip to content

vehicle_range should not publish invalid values #98

Open
@Gibby

Description

All working good when vehicle is running. However, I see this when the vehicle is off.

info: Publishing message {"payload":{"availability_topic":"homeassistant/xxx/available","device":{"identifiers":["xxx"],"manufacturer":"GMC","model":"2021","name":"2021 GMC Yukon Denali XL"},"name":"Gas Range","payload_available":"true","payload_not_available":"false","state_topic":"homeassistant/sensor/xxx/vehicle_range/state","unit_of_measurement":"km","value_template":"{{ value_json.gas_range }}"},"topic":"homeassistant/sensor/xxx/gas_range/config"}  

info: Publishing message {"payload":{"availability_topic":"homeassistant/xxx/available","device":{"identifiers":["xxx"],"manufacturer":"GMC","model":"2021","name":"2021 GMC Yukon Denali XL"},"name":"Gas Range Mi","payload_available":"true","payload_not_available":"false","state_topic":"homeassistant/sensor/xxx/vehicle_range/state","unit_of_measurement":"mi","value_template":"{{ value_json.gas_range_mi }}"},"topic":"homeassistant/sensor/xxx/gas_range_mi/config"} 

info: Publishing message {"state":{"gas_range":"XXX","gas_range_mi":null},"topic":"homeassistant/sensor/xxx/vehicle_range/state"}                                                               

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions