Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Mileage Unavailable #91

Closed
2 of 4 tasks
jgrob1 opened this issue Jan 28, 2025 · 6 comments · Fixed by #93
Closed
2 of 4 tasks

[ISSUE] Mileage Unavailable #91

jgrob1 opened this issue Jan 28, 2025 · 6 comments · Fixed by #93
Assignees
Labels
bug Something isn't working solved for next release

Comments

@jgrob1
Copy link

jgrob1 commented Jan 28, 2025

Home Assistant Version

2024.12.3

MG/SAIC Integration Version

0.8.2

Installation Method

HACS

Did you check for existing issues?

  • Yes, I have checked for existing issues
  • No, I have not checked for existing issues

Did you enable debug logging before and are ready to post logs?

  • Yes, I have enabled debug logging
  • No, I have not enabled debug logging

Describe the Issue

I can see that the mileage is being received in the logs but the sensor appears as 'unavailable'.

Logs

2025-01-28 09:47:36.641 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration airsend which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.644 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smartir which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.646 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration xplora_watch which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.648 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration cover_rf_time_based which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.650 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration alexa_media which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.652 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration mg_saic which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.655 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration octopus_energy which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.658 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration samsungtv_smart which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.660 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration rpi_gpio_pwm which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.662 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration spook which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.664 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smartthings_find which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.666 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration spook_inverse which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:36.668 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-28 09:47:45.478 DEBUG (MainThread) [homeassistant.components.rflink] Initiating Rflink connection
2025-01-28 09:47:45.483 DEBUG (MainThread) [homeassistant.components.rflink] Connected to Rflink
2025-01-28 09:47:45.484 DEBUG (MainThread) [rflink.protocol] connected
2025-01-28 09:47:46.597 DEBUG (MainThread) [rflink.protocol] received data: 20;00;Nodo RadioFrequencyLink - RFLink Gateway V1.1 - R51
20;01;MiLight=OFF;NO NRF24L01;
20;02;setGPIO=ON;
2025-01-28 09:47:46.597 WARNING (MainThread) [rflink.protocol] dropping invalid data: 20;00;Nodo RadioFrequencyLink - RFLink Gateway V1.1 - R51
2025-01-28 09:47:46.598 WARNING (MainThread) [rflink.protocol] dropping invalid data: 20;01;MiLight=OFF;NO NRF24L01;
2025-01-28 09:47:46.598 DEBUG (MainThread) [rflink.protocol] got packet: 20;02;setGPIO=ON;
2025-01-28 09:47:46.598 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'unknown', 'setgpio': 'on'}
2025-01-28 09:47:47.141 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'cover_rf_time_based' registers an entity service with a non entity service schema at custom_components/cover_rf_time_based/cover.py, line 157: platform.async_register_entity_service(. This will stop working in Home Assistant 2025.9, please report it to the author of the 'cover_rf_time_based' custom integration
2025-01-28 09:47:47.149 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'cover_rf_time_based' registers an entity service with a non entity service schema at custom_components/cover_rf_time_based/cover.py, line 161: platform.async_register_entity_service(. This will stop working in Home Assistant 2025.9, please report it to the author of the 'cover_rf_time_based' custom integration
2025-01-28 09:47:49.524 DEBUG (MainThread) [custom_components.mg_saic] Logging in with base URL: https://gateway-mg-eu.soimt.com/api.app/v1/ for region: EU
2025-01-28 09:47:52.036 DEBUG (MainThread) [custom_components.mg_saic] Login successful, initializing vehicle APIs.
2025-01-28 09:47:52.130 DEBUG (MainThread) [custom_components.mg_saic] Update intervals initialized: Default: 5:00:00, Charging: 0:10:00, Powered: 0:10:00, After Shutdown: 0:02:00, Grace Period: 0:10:00, After Action Delay: 0:00:15
2025-01-28 09:47:55.783 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'xplora_watch' calls async_forward_entry_setup for integration, xplora_watch with title: Xplora® and entry_id: 01JBFW9AQQFJGBF8BMA1M759VK, which is deprecated, await async_forward_entry_setups instead at custom_components/xplora_watch/__init__.py, line 67: hass.async_create_task(hass.config_entries.async_forward_entry_setup(entry, platform)). This will stop working in Home Assistant 2025.6, please create a bug report at https://github.com/Ludy87/xplora_watch/issues
2025-01-28 09:48:03.265 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'smartir' calls `async_track_state_change` instead of `async_track_state_change_event` which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/smartir/climate.py, line 176: async_track_state_change(self.hass, self._temperature_sensor,. Please report it to the author of the 'smartir' custom integration
2025-01-28 09:48:03.272 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'smartir' calls `async_track_state_change` instead of `async_track_state_change_event` which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/smartir/climate.py, line 184: async_track_state_change(self.hass, self._humidity_sensor,. Please report it to the author of the 'smartir' custom integration
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once
    handle._run()
  File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2353, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1199, in _report_non_awaited_platform_forwards
    report_usage(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 234, in report_usage
    _LOGGER.warning(msg, stack_info=True)
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once
    handle._run()
  File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2353, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1199, in _report_non_awaited_platform_forwards
    report_usage(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 234, in report_usage
    _LOGGER.warning(msg, stack_info=True)01-28 09:48:11.702 WARNING (MainThread) [custom_components.smartthings_find.utils] [Galaxy S8] No operation found in response; marking 
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once
    handle._run()
  File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2353, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1199, in _report_non_awaited_platform_forwards
    report_usage(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 234, in report_usage
    _LOGGER.warning(msg, stack_info=True)
2025-01-28 09:48:12.114 DEBUG (MainThread) [custom_components.mg_saic] Charging data not available.
2025-01-28 09:48:12.115 DEBUG (MainThread) [custom_components.mg_saic] Detected activity for lockStatus: previous=None, current=1
2025-01-28 09:48:12.115 DEBUG (MainThread) [custom_components.mg_saic] Detected activity for driverDoor: previous=None, current=0
2025-01-28 09:48:12.115 DEBUG (MainThread) [custom_components.mg_saic] Detected activity for passengerDoor: previous=None, current=0
2025-01-28 09:48:12.115 DEBUG (MainThread) [custom_components.mg_saic] Detected activity for rearLeftDoor: previous=None, current=0
2025-01-28 09:48:12.115 DEBUG (MainThread) [custom_components.mg_saic] Detected activity for rearRightDoor: previous=None, current=0
2025-01-28 09:48:12.115 DEBUG (MainThread) [custom_components.mg_saic] Detected activity for bootStatus: previous=None, current=0
2025-01-28 09:48:12.115 DEBUG (MainThread) [custom_components.mg_saic] Detected activity for bonnetStatus: previous=None, current=0
2025-01-28 09:48:12.115 DEBUG (MainThread) [custom_components.mg_saic] Detected activity for remoteClimateStatus: previous=None, current=0
2025-01-28 09:48:12.115 DEBUG (MainThread) [custom_components.mg_saic] Detected activity for rmtHtdRrWndSt: previous=None, current=0
2025-01-28 09:48:12.115 DEBUG (MainThread) [custom_components.mg_saic] Detected activity for engineStatus: previous=None, current=0
2025-01-28 09:48:12.116 DEBUG (MainThread) [custom_components.mg_saic] Detected power mode change: previous=None, current=0
2025-01-28 09:48:12.116 DEBUG (MainThread) [custom_components.mg_saic] Updated Last Vehicle Activity: 2025-01-28 09:48:12.116088+00:00
2025-01-28 09:48:12.118 DEBUG (MainThread) [custom_components.mg_saic] Evaluating interval adjustment: Powered On: False, Charging: False, Idle Duration: 1 day, 0:00:19.988538, Activity Duration: 0:00:00.002709
2025-01-28 09:48:12.119 DEBUG (MainThread) [custom_components.mg_saic] Within grace period. Using grace period interval.
2025-01-28 09:48:12.119 DEBUG (MainThread) [custom_components.mg_saic] Adjusted update interval: 0:10:00.
2025-01-28 09:48:12.119 DEBUG (MainThread) [custom_components.mg_saic] Next update scheduled in 0:10:00.
2025-01-28 09:48:12.122 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Type: ICE
2025-01-28 09:48:12.122 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Info: [VinInfo(bindTime=1735124834000, brandName='MG', colorName='FLARE RED', isActivate=False, isCurrentVehicle=True, isSubaccount=True, modelName='AS33 UK', modelYear='2024', name=None, series='AS33 UK', vin='LSJW94U99RG051600', subAccountList=[], vehicleModelConfiguration=[VehicleModelConfiguration(itemCode='J17', itemName='Tire', itemValue='1'), VehicleModelConfiguration(itemCode='Q00', itemName='Airbag', itemValue='1'), VehicleModelConfiguration(itemCode='Q01', itemName='FAirbag', itemValue='1'), VehicleModelConfiguration(itemCode='Q09', itemName='AirbagS', itemValue='1'), VehicleModelConfiguration(itemCode='S35', itemName='Sunroof', itemValue='0'), VehicleModelConfiguration(itemCode='S61', itemName='Remote control', itemValue='1'), VehicleModelConfiguration(itemCode='T11', itemName='AC', itemValue='1'), VehicleModelConfiguration(itemCode='EPS', itemName='EPS', itemValue='1'), VehicleModelConfiguration(itemCode='SA64', itemName='SA64', itemValue='0111110000000000001000000100101000000010100000000000000000000110'), VehicleModelConfiguration(itemCode='BONNUT', itemName='BONNUT', itemValue='1'), VehicleModelConfiguration(itemCode='DOOR', itemName='DOOR', itemValue='1111'), VehicleModelConfiguration(itemCode='BOOT', itemName='BOOT', itemValue='1'), VehicleModelConfiguration(itemCode='ENGINE', itemName='ENGINE', itemValue='1'), VehicleModelConfiguration(itemCode='EV', itemName='EV', itemValue='1'), VehicleModelConfiguration(itemCode='HeatedSeat', itemName='HeatedSeat', itemValue='1'), VehicleModelConfiguration(itemCode='KEYPOS', itemName='KEYPOS', itemValue='0'), VehicleModelConfiguration(itemCode='ENERGY', itemName='ENERGY', itemValue='1'), VehicleModelConfiguration(itemCode='BATTERY', itemName='BATTERY', itemValue='1'), VehicleModelConfiguration(itemCode='INTEMP', itemName='INTEMP', itemValue='1'), VehicleModelConfiguration(itemCode='EXTEMP', itemName='EXTEMP', itemValue='1'), VehicleModelConfiguration(itemCode='WINDOW', itemName='WINDOW', itemValue='0000'), VehicleModelConfiguration(itemCode='LRD', itemName='LRD', itemValue='1'), VehicleModelConfiguration(itemCode='BTKEY', itemName='BTKEY', itemValue='0'), VehicleModelConfiguration(itemCode='BType', itemName='Battery', itemValue='0'), VehicleModelConfiguration(itemCode='SBH', itemName='SBH', itemValue='0'), VehicleModelConfiguration(itemCode='BHI', itemName='BHI', itemValue='0'), VehicleModelConfiguration(itemCode='SWH', itemName='SWH', itemValue='0'), VehicleModelConfiguration(itemCode='ROV', itemName='ROV', itemValue='25858')])]
2025-01-28 09:48:12.123 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Status: VehicleStatusResp(basicVehicleStatus=BasicVehicleStatus(batteryVoltage=124, bonnetStatus=0, bootStatus=0, canBusActive=1, clstrDspdFuelLvlSgmt=4, currentJourneyId=470, currentJourneyDistance=140, dippedBeamStatus=0, driverDoor=0, driverWindow=0, engineStatus=0, extendedData1=83, extendedData2=2147483647, exteriorTemperature=8, frontLeftSeatHeatLevel=0, frontLeftTyrePressure=62, frontRightSeatHeatLevel=0, frontRightTyrePressure=61, fuelLevelPrc=43, fuelRange=2710, fuelRangeElec=None, handBrake=1, interiorTemperature=8, lastKeySeen=0, lockStatus=1, mainBeamStatus=0, mileage=31250, passengerDoor=0, passengerWindow=0, powerMode=0, rearLeftDoor=0, rearLeftTyrePressure=60, rearLeftWindow=0, rearRightDoor=0, rearRightTyrePressure=61, rearRightWindow=0, remoteClimateStatus=0, rmtHtdRrWndSt=0, sideLightStatus=0, steeringHeatLevel=0, steeringWheelHeatFailureReason=0, sunroofStatus=1, timeOfLastCANBUSActivity=None, vehElecRngDsp=0, vehicleAlarmStatus=2, wheelTyreMonitorStatus=0), extendedVehicleStatus=ExtendedVehicleStatus(alertDataSum=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), gpsPosition=GpsPosition(gpsStatus=2, timeStamp=1738057688, wayPoint=GpsPosition.WayPoint(hdop=6, heading=0, position=GpsPosition.WayPoint.Position(altitude=133, latitude=51284114, longitude=-1650953), satellites=9, speed=0)), statusTime=1738057688)
2025-01-28 09:48:12.125 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Charging Data: None
2025-01-28 09:48:12.125 DEBUG (MainThread) [custom_components.mg_saic] State updated: Is Powered On: False, Is Charging: False, Last Powered On Time: 2025-01-27 09:47:52.130269+00:00, Last Powered Off Time: 2025-01-27 09:47:52.130259+00:00, Last Vehicle Activity: 2025-01-28 09:48:12.116088+00:00, Update Interval: 0:10:00
2025-01-28 09:48:12.125 DEBUG (MainThread) [custom_components.mg_saic] Finished fetching MG SAIC data update coordinator data in 19.995 seconds (success: True)
2025-01-28 09:48:12.129 WARNING (MainThread) [custom_components.smartthings_find.utils] [J-G's S24 Ultra] No operation found in response; marking update failed
2025-01-28 09:48:12.536 WARNING (MainThread) [custom_components.smartthings_find.utils] [J-G's Note10+] No operation found in response; marking update failed
2025-01-28 09:48:12.581 WARNING (MainThread) [homeassistant.components.switch] Platform broadlink not ready yet: None; Retrying in background in 30 seconds
2025-01-28 09:48:12.584 WARNING (MainThread) [homeassistant.components.switch] Platform broadlink not ready yet: None; Retrying in background in 30 seconds
2025-01-28 09:48:13.945 DEBUG (MainThread) [custom_components.mg_saic] Next update scheduled in 0:10:00.
2025-01-28 09:48:13.991 ERROR (MainThread) [homeassistant.components.select] Error while setting up mg_saic platform for select
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/mg_saic/select.py", line 36, in async_setup_entry
    SAICMGHeatedSeatLevelSelect(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        coordinator,
        ^^^^^^^^^^^^
    ...<5 lines>...
        "mdi:car-seat-heater",
        ^^^^^^^^^^^^^^^^^^^^^^
    ),
    ^
TypeError: SAICMGHeatedSeatLevelSelect.__init__() missing 1 required positional argument: 'icon'
2025-01-28 09:48:14.036 DEBUG (MainThread) [custom_components.mg_saic] Sunroof switch not created for VIN LSJW94U99RG051600.
2025-01-28 09:48:14.375 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID USB_SmartPlug_relay_0 already exists - ignoring switch.usb_smartplug_mains
2025-01-28 09:48:14.382 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID USB_SmartPlug_relay_1 already exists - ignoring switch.usb_smartplug_usb
2025-01-28 09:48:14.951 ERROR (MainThread) [homeassistant.components.camera] Platform mqtt does not generate unique IDs. ID a83fa180b797-motion-snapshot already exists - ignoring camera.garage_cam_motion_snapshot
2025-01-28 09:48:14.982 ERROR (MainThread) [homeassistant.components.mqtt.entity] Error ''value_template' must be set together with 'state_topic'.' when processing MQTT discovery message topic: 'homeassistant/cover/LeoCam/motor_up_down/config', message: '{'unique_id': 'a83fa180b797-move-up-down', 'device': {'identifiers': 'a83fa180b797', 'connections': [['mac', 'a8:3f:a1:80:b7:97']], 'manufacturer': 'Xiaomi', 'model': 'Dafang', 'sw_version': '2021-02-26T04:55:03Z - master - 972ba9d', 'name': 'LeoCam'}, 'set_position_topic': 'LeosRoom/LeoCam/motors/vertical/set', 'position_topic': 'LeosRoom/LeoCam/motors/vertical', 'command_topic': 'LeosRoom/LeoCam/motors/vertical/set', 'payload_close': 'down', 'payload_open': 'up', 'optimistic': 'false', 'value_template': '{{ ((value|int)/(700/100))|round }}', 'set_position_template': '{{ ((position|int)*(700/100))|round }}', 'name': 'LeoCam move up/down'}'
2025-01-28 09:48:14.996 ERROR (MainThread) [homeassistant.components.mqtt.entity] Error ''value_template' must be set together with 'state_topic'.' when processing MQTT discovery message topic: 'homeassistant/cover/LeoCam/motor_left_right/config', message: '{'unique_id': 'a83fa180b797-move-left-right', 'device': {'identifiers': 'a83fa180b797', 'connections': [['mac', 'a8:3f:a1:80:b7:97']], 'manufacturer': 'Xiaomi', 'model': 'Dafang', 'sw_version': '2021-02-26T04:55:03Z - master - 972ba9d', 'name': 'LeoCam'}, 'set_position_topic': 'LeosRoom/LeoCam/motors/horizontal/set', 'position_topic': 'LeosRoom/LeoCam/motors/horizontal', 'command_topic': 'LeosRoom/LeoCam/motors/horizontal/set', 'payload_close': 'right', 'payload_open': 'left', 'optimistic': 'false', 'value_template': '{{ ((value|int)/(2600/100))|round }}', 'set_position_template': '{{ ((position|int)*(2600/100))|round }}', 'name': 'LeoCam move left/right'}'
2025-01-28 09:48:15.275 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-motion-detection already exists - ignoring switch.garage_cam_motion_detection
2025-01-28 09:48:15.279 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-motion-send-mail already exists - ignoring switch.garage_cam_motion_send_emails
2025-01-28 09:48:15.282 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-motion-send-telegram already exists - ignoring switch.garage_cam_motion_send_telegram
2025-01-28 09:48:15.286 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-motion-tracking already exists - ignoring switch.garage_cam_motion_tracking
2025-01-28 09:48:15.288 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-blue-led already exists - ignoring switch.garage_cam_blue_led
2025-01-28 09:48:15.290 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-yellow-led already exists - ignoring switch.garage_cam_yellow_led
2025-01-28 09:48:15.294 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-ir-led already exists - ignoring switch.garage_cam_ir_led
2025-01-28 09:48:15.303 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-ir-filter already exists - ignoring switch.garage_cam_ir_filter
2025-01-28 09:48:15.306 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-night-mode already exists - ignoring switch.garage_cam_night_mode
2025-01-28 09:48:15.308 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-night-mode-auto already exists - ignoring switch.garage_cam_auto_night_detection
2025-01-28 09:48:15.312 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-rtsp-server already exists - ignoring switch.garage_cam_rtsp_server
2025-01-28 09:48:15.314 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-recording already exists - ignoring switch.garage_cam_recording
2025-01-28 09:48:15.318 ERROR (MainThread) [homeassistant.components.switch] Platform mqtt does not generate unique IDs. ID a83fa180b797-timelapse already exists - ignoring switch.garage_cam_timelapse
2025-01-28 09:48:18.640 DEBUG (MainThread) [custom_components.mg_saic] Charging data not available.
2025-01-28 09:48:18.640 DEBUG (MainThread) [custom_components.mg_saic] No changes detected in monitored keys or charging status.
2025-01-28 09:48:18.645 DEBUG (MainThread) [custom_components.mg_saic] Evaluating interval adjustment: Powered On: False, Charging: False, Idle Duration: 1 day, 0:00:26.515439, Activity Duration: 0:00:06.529610
2025-01-28 09:48:18.645 DEBUG (MainThread) [custom_components.mg_saic] Within grace period. Using grace period interval.
2025-01-28 09:48:18.646 DEBUG (MainThread) [custom_components.mg_saic] Adjusted update interval: 0:10:00.
2025-01-28 09:48:18.646 DEBUG (MainThread) [custom_components.mg_saic] Next update scheduled in 0:10:00.
2025-01-28 09:48:18.646 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Type: ICE
2025-01-28 09:48:18.646 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Info: [VinInfo(bindTime=1735124834000, brandName='MG', colorName='FLARE RED', isActivate=False, isCurrentVehicle=True, isSubaccount=True, modelName='AS33 UK', modelYear='2024', name=None, series='AS33 UK', vin='LSJW94U99RG051600', subAccountList=[], vehicleModelConfiguration=[VehicleModelConfiguration(itemCode='J17', itemName='Tire', itemValue='1'), VehicleModelConfiguration(itemCode='Q00', itemName='Airbag', itemValue='1'), VehicleModelConfiguration(itemCode='Q01', itemName='FAirbag', itemValue='1'), VehicleModelConfiguration(itemCode='Q09', itemName='AirbagS', itemValue='1'), VehicleModelConfiguration(itemCode='S35', itemName='Sunroof', itemValue='0'), VehicleModelConfiguration(itemCode='S61', itemName='Remote control', itemValue='1'), VehicleModelConfiguration(itemCode='T11', itemName='AC', itemValue='1'), VehicleModelConfiguration(itemCode='EPS', itemName='EPS', itemValue='1'), VehicleModelConfiguration(itemCode='SA64', itemName='SA64', itemValue='0111110000000000001000000100101000000010100000000000000000000110'), VehicleModelConfiguration(itemCode='BONNUT', itemName='BONNUT', itemValue='1'), VehicleModelConfiguration(itemCode='DOOR', itemName='DOOR', itemValue='1111'), VehicleModelConfiguration(itemCode='BOOT', itemName='BOOT', itemValue='1'), VehicleModelConfiguration(itemCode='ENGINE', itemName='ENGINE', itemValue='1'), VehicleModelConfiguration(itemCode='EV', itemName='EV', itemValue='1'), VehicleModelConfiguration(itemCode='HeatedSeat', itemName='HeatedSeat', itemValue='1'), VehicleModelConfiguration(itemCode='KEYPOS', itemName='KEYPOS', itemValue='0'), VehicleModelConfiguration(itemCode='ENERGY', itemName='ENERGY', itemValue='1'), VehicleModelConfiguration(itemCode='BATTERY', itemName='BATTERY', itemValue='1'), VehicleModelConfiguration(itemCode='INTEMP', itemName='INTEMP', itemValue='1'), VehicleModelConfiguration(itemCode='EXTEMP', itemName='EXTEMP', itemValue='1'), VehicleModelConfiguration(itemCode='WINDOW', itemName='WINDOW', itemValue='0000'), VehicleModelConfiguration(itemCode='LRD', itemName='LRD', itemValue='1'), VehicleModelConfiguration(itemCode='BTKEY', itemName='BTKEY', itemValue='0'), VehicleModelConfiguration(itemCode='BType', itemName='Battery', itemValue='0'), VehicleModelConfiguration(itemCode='SBH', itemName='SBH', itemValue='0'), VehicleModelConfiguration(itemCode='BHI', itemName='BHI', itemValue='0'), VehicleModelConfiguration(itemCode='SWH', itemName='SWH', itemValue='0'), VehicleModelConfiguration(itemCode='ROV', itemName='ROV', itemValue='25858')])]
2025-01-28 09:48:18.646 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Status: VehicleStatusResp(basicVehicleStatus=BasicVehicleStatus(batteryVoltage=125, bonnetStatus=0, bootStatus=0, canBusActive=1, clstrDspdFuelLvlSgmt=4, currentJourneyId=470, currentJourneyDistance=140, dippedBeamStatus=0, driverDoor=0, driverWindow=0, engineStatus=0, extendedData1=83, extendedData2=2147483647, exteriorTemperature=8, frontLeftSeatHeatLevel=0, frontLeftTyrePressure=62, frontRightSeatHeatLevel=0, frontRightTyrePressure=61, fuelLevelPrc=43, fuelRange=2710, fuelRangeElec=None, handBrake=1, interiorTemperature=9, lastKeySeen=0, lockStatus=1, mainBeamStatus=0, mileage=31250, passengerDoor=0, passengerWindow=0, powerMode=0, rearLeftDoor=0, rearLeftTyrePressure=60, rearLeftWindow=0, rearRightDoor=0, rearRightTyrePressure=61, rearRightWindow=0, remoteClimateStatus=0, rmtHtdRrWndSt=0, sideLightStatus=0, steeringHeatLevel=0, steeringWheelHeatFailureReason=0, sunroofStatus=1, timeOfLastCANBUSActivity=None, vehElecRngDsp=0, vehicleAlarmStatus=2, wheelTyreMonitorStatus=0), extendedVehicleStatus=ExtendedVehicleStatus(alertDataSum=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), gpsPosition=GpsPosition(gpsStatus=2, timeStamp=1738057694, wayPoint=GpsPosition.WayPoint(hdop=6, heading=0, position=GpsPosition.WayPoint.Position(altitude=135, latitude=51284115, longitude=-1650961), satellites=9, speed=0)), statusTime=1738057694)
2025-01-28 09:48:18.647 DEBUG (MainThread) [custom_components.mg_saic] Vehicle Charging Data: None
2025-01-28 09:48:18.647 DEBUG (MainThread) [custom_components.mg_saic] State updated: Is Powered On: False, Is Charging: False, Last Powered On Time: 2025-01-27 09:47:52.130269+00:00, Last Powered Off Time: 2025-01-27 09:47:52.130259+00:00, Last Vehicle Activity: 2025-01-28 09:48:12.116088+00:00, Update Interval: 0:10:00
2025-01-28 09:48:18.647 DEBUG (MainThread) [custom_components.mg_saic] Finished fetching MG SAIC data update coordinator data in 4.708 seconds (success: True)
2025-01-28 09:48:18.647 DEBUG (MainThread) [custom_components.mg_saic] Next update scheduled in 0:10:00.
2025-01-28 09:48:18.688 INFO (MainThread) [custom_components.mg_saic] Services registered for MG SAIC integration.
2025-01-28 09:48:18.688 INFO (MainThread) [custom_components.mg_saic] MG SAIC integration setup completed successfully.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once
    handle._run()
  File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 779, in _async_add_entity
    device = dev_reg.async_get(self.hass).async_get_or_create(
  File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 810, in async_get_or_create
    report_usage(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 234, in report_usage
    _LOGGER.warning(msg, stack_info=True)
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once
    handle._run()
  File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2353, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1199, in _report_non_awaited_platform_forwards
    report_usage(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 234, in report_usage
    _LOGGER.warning(msg, stack_info=True)
2025-01-28 09:48:21.359 ERROR (MainThread) [homeassistant.components.generic.camera] Error getting new camera image from 192_168_1_76: All connection attempts failed
2025-01-28 09:48:31.453 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.maxcam] Error from stream worker: Error opening stream (ERRORTYPE_113, Host is unreachable, rtsp://****:****@192.168.1.76:8554/unicast)
2025-01-28 09:48:44.528 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.maxcam] Error from stream worker: Error opening stream (ERRORTYPE_113, Host is unreachable, rtsp://****:****@192.168.1.76:8554/unicast)

Additional Context

No response

@jgrob1 jgrob1 added the bug Something isn't working label Jan 28, 2025
@jgrob1
Copy link
Author

jgrob1 commented Jan 28, 2025

Image

@ad-ha
Copy link
Owner

ad-ha commented Jan 29, 2025

Let me see what's happening. Maybe is due to the checks with BEV and PHEV, and you do not get Charging data., so it may be failing because of that.

@ad-ha ad-ha self-assigned this Jan 29, 2025
@jgrob1
Copy link
Author

jgrob1 commented Jan 29, 2025 via email

@ad-ha
Copy link
Owner

ad-ha commented Jan 29, 2025

I saw that. But the basic data many times reports generic mileage and there's a cross check with a mileage field from the charging data, which may not be entirely falling back in case of ICE vehicles.

@ad-ha
Copy link
Owner

ad-ha commented Jan 29, 2025

Found the issue and got it fixed for next release.

The sensor was only available if both status and charging data was available. In ICE cases, charging data is not available and the sensor was deemed unavailable.

@jgrob1
Copy link
Author

jgrob1 commented Jan 29, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working solved for next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants