TomerFi / aioswitcher

PyPi module integrating with various Switcher devices
https://aioswitcher.tomfi.info
Apache License 2.0
30 stars 19 forks source link

chore: make a single switcherapi class #809

Closed YogevBokobza closed 2 weeks ago

YogevBokobza commented 3 weeks ago

Description

BREAKING CHANGE: Convert SwitcherType1Api and SwitcherType2Api to a single SwitcherApi class.

Related issue (if any): fixes #778

Checklist

YogevBokobza commented 3 weeks ago

Does adding "IF"s to each function make sense to allow the function to run only for a specific device type? I mean this function "stop_shutter(..)" is meant for Type2 devices and not Type1. Should we block accessing Type1 devices for this function?

thecode commented 2 weeks ago

Does adding "IF"s to each function make sense to allow the function to run only for a specific device type? I mean this function "stop_shutter(..)" is meant for Type2 devices and not Type1. Should we block accessing Type1 devices for this function?

I don't think we should complicate the implementation with this

YogevBokobza commented 2 weeks ago

Does adding "IF"s to each function make sense to allow the function to run only for a specific device type? I mean this function "stop_shutter(..)" is meant for Type2 devices and not Type1. Should we block accessing Type1 devices for this function?

I don't think we should complicate the implementation with this

Fine by me.

TomerFi commented 2 weeks ago

Thank you very much! Merged and released: 5.0.0.