Skip to content

Implement support for static IP addresses#26

Open
AleksaMCode wants to merge 4 commits intomasterfrom
feat/device-static-ip
Open

Implement support for static IP addresses#26
AleksaMCode wants to merge 4 commits intomasterfrom
feat/device-static-ip

Conversation

@AleksaMCode
Copy link
Copy Markdown
Owner

Closes #18

@AleksaMCode AleksaMCode self-assigned this Jan 12, 2026
@AleksaMCode
Copy link
Copy Markdown
Owner Author

Needs to be tested and reformatted using black.

super().__init__(client, mac, ip)
self._name = name
self._rabbitmq = rabbitmq
state_file = Path(f"state-{mac.replace(':', '-')}.json")
Copy link
Copy Markdown
Owner Author

@AleksaMCode AleksaMCode Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now problematic as MAC address can be None. Logic needs updating!

Also, update save_state() method.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick fix could be to use device name instead of a MAC address.

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.

Implement support for static IP addresses for smart plugs

1 participant