github jsight/ha-pecron v0.3.1
v0.3.1: Critical Fix - Switches Not Appearing

latest releases: v0.5.0, v0.4.1, v0.4.0...
3 months ago

🔧 Critical Patch Release: v0.3.1

This emergency patch fixes a critical bug in v0.3.0 where switches and some sensors didn't appear after integration reload.

🐛 Bug Fixed

Problem: After upgrading to v0.3.0 and reloading the integration, users only saw 5 sensors and no switches (AC Output, DC Output).

Root Cause: The TSL (Thing Specification Language) uses property codes with _hm suffix (e.g., ac_switch_hm, dc_switch_hm, ups_status_hm), but the unofficial-pecron-api maps these to properties without the suffix. Our TSL filtering was too strict and only checked exact matches, causing entities to be filtered out.

Solution: TSL filtering now checks both property_name and property_name_hm variants.

✅ What's Fixed

  • AC Output switch now appears
  • DC Output switch now appears
  • UPS Mode binary sensor now appears
  • ✅ All supported sensors are created properly

🚀 Upgrade Instructions

If you're on v0.3.0 and don't see your switches:

  1. Update to v0.3.1 (via HACS or manual installation)
  2. Reload the integration:
    • Go to Settings → Devices & Services
    • Find Pecron integration
    • Click three dots → Reload
  3. Verify: You should now see AC Output and DC Output switches

📝 Changed Files

  • custom_components/pecron/switch.py - Fixed TSL filtering for switches
  • custom_components/pecron/binary_sensor.py - Fixed TSL filtering for binary sensors
  • custom_components/pecron/sensor.py - Fixed TSL filtering for sensors

Full Changelog: https://github.com/jsight/ha-pecron/blob/main/CHANGELOG.md

Apologies for the inconvenience caused by v0.3.0. This fix ensures the new control features work as intended! 🙏

Don't miss a new ha-pecron release

NewReleases is sending notifications on new releases.