Skip to content

Remove unsupported Protected argument from Domoticz device creation#1

Merged
MadPatrick merged 1 commit into
masterfrom
copilot/fix-plugin-store-errors
May 31, 2026
Merged

Remove unsupported Protected argument from Domoticz device creation#1
MadPatrick merged 1 commit into
masterfrom
copilot/fix-plugin-store-errors

Conversation

Copy link
Copy Markdown

Copilot AI commented May 31, 2026

Plugin startup failed during device initialization because Domoticz.Device(...) was called with Protected=1, which is not accepted in this Domoticz runtime (TypeError: 'protected' is an invalid keyword argument).

  • Problem scope

    • Startup path failed before API helper devices could be created (API Payload, API Trigger), leaving the plugin in a broken initialization state.
  • Code changes

    • Updated device creation calls in:
      • plugin.py
      • plugin_core.py
    • Removed unsupported Protected=1 keyword from both Domoticz.Device(...) calls while preserving all other device metadata (Name, Unit, Type*, DeviceID, Used).
  • Behavior impact

    • Plugin initialization now uses only supported Domoticz.Device parameters, allowing device creation to proceed on runtimes that reject protected/Protected.
# Before
Domoticz.Device(..., Used=1, Protected=1).Create()

# After
Domoticz.Device(..., Used=1).Create()

@MadPatrick MadPatrick marked this pull request as ready for review May 31, 2026 13:17
@MadPatrick MadPatrick merged commit cabcc8a into master May 31, 2026
@MadPatrick MadPatrick deleted the copilot/fix-plugin-store-errors branch May 31, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants