Skip to content

Update version to 1.0.3

Latest

Choose a tag to compare

@lavalex2003 lavalex2003 released this 06 Feb 09:45
bf68ad3

ProfiMaktab v1.0.3 - Fix Sensor Attributes and Thread Safety

🐛 Bugs Fixed

Critical Issues

  • Fixed RuntimeError on dispatcher callback: Sensor attributes were not displaying in UI due to async_write_ha_state() being called from non-event-loop thread
  • Fixed thread-safety violation: Dispatcher callbacks now use call_soon_threadsafe() to safely update sensor state
  • Fixed missing sensor attributes: Attributes (lessons, marks, etc.) now properly display after data fetch from API
  • Fixed ProfiMaktabOptionsFlow attribute conflict: Resolved property naming conflict in config flow

Improvements

  • Added initial state write in async_added_to_hass() to immediately display sensor data after setup
  • Removed excessive DEBUG logging for cleaner Home Assistant logs
  • Enhanced error handling in data update process

📊 What's Changed

  • Thread-safe dispatcher implementation for sensor updates
  • Proper lifecycle management for sensor attributes
  • Improved logging for troubleshooting
  • Better data synchronization between sensors

✅ Testing

  • Sensor attributes now display correctly in UI
  • Button "Update ProfiMaktab Data" works without errors
  • Data updates propagate correctly across all sensors
  • No more event loop thread-safety errors

📝 Version

  • Before: 1.0.2
  • After: 1.0.3