dashio 3.3.7__tar.gz → 3.3.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dashio-3.3.7 → dashio-3.3.9}/PKG-INFO +1 -1
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/button.py +3 -3
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/control.py +8 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/device_view.py +6 -6
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/dial.py +3 -3
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/direction.py +2 -2
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/knob.py +3 -3
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/label.py +2 -2
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/slider.py +3 -3
- {dashio-3.3.7 → dashio-3.3.9}/dashio.egg-info/PKG-INFO +1 -1
- {dashio-3.3.7 → dashio-3.3.9}/setup.py +1 -1
- {dashio-3.3.7 → dashio-3.3.9}/LICENSE +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/README.md +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/__init__.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/action_station.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/action_station_services/__init__.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/action_station_services/action_station_service_config.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/action_station_services/as_servicel.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/action_station_services/clock_servicel.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/action_station_services/modbus_service.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/action_station_services/task_service.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/action_station_services/timer_service.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/bleconnection.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/constants.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/dashconnection.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/device.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/__init__.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/alarm.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/audio_visual_display.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/button_group.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/chart.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/color_picker.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/enums.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/event.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/event_log.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/map.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/menu.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/ring_buffer.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/selector.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/textbox.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/iotcontrol/time_graph.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/ip.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/load_config.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/mqttconnection.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/py.typed +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/serialconnection.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/tcpconnection.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/zeroconf_service.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio/zmqconnection.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio.egg-info/SOURCES.txt +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio.egg-info/dependency_links.txt +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio.egg-info/not-zip-safe +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio.egg-info/requires.txt +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/dashio.egg-info/top_level.txt +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/pyproject.toml +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/setup.cfg +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_alarm.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_button.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_button_group.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_chart.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_control.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_dashconnection.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_dashdevice.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_device_view.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_dial.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_direction.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_event_log.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_knob.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_label.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_map.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_menu.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_mqttconntection.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_selector.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_slider.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_tcpconnection.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_textbox.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_time_graph.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/tests/test_zqmconnection.py +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/utilities/c64_decode +0 -0
- {dashio-3.3.7 → dashio-3.3.9}/utilities/c64_encode +0 -0
|
@@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
22
22
|
SOFTWARE.
|
|
23
23
|
"""
|
|
24
24
|
from ..constants import BAD_CHARS
|
|
25
|
-
from .control import Control, ControlPosition, ControlConfig, _get_color, _get_icon, _get_title_position, _get_button_style
|
|
25
|
+
from .control import Control, ControlPosition, ControlConfig, _get_color, _get_icon, _get_title_position, _get_button_style, _get_color_str
|
|
26
26
|
from .enums import ButtonState, Color, Icon, TitlePosition, ButtonStyle
|
|
27
27
|
|
|
28
28
|
|
|
@@ -46,8 +46,8 @@ class ButtonConfig(ControlConfig):
|
|
|
46
46
|
self.cfg["iconName"] = icon_name.value
|
|
47
47
|
self.cfg["buttonEnabled"] = button_enabled
|
|
48
48
|
self.cfg["style"] = str(style.value)
|
|
49
|
-
self.cfg["onColor"] =
|
|
50
|
-
self.cfg["offColor"] =
|
|
49
|
+
self.cfg["onColor"] = _get_color_str(on_color)
|
|
50
|
+
self.cfg["offColor"] = _get_color_str(off_color)
|
|
51
51
|
|
|
52
52
|
@classmethod
|
|
53
53
|
def from_dict(cls, cfg_dict: dict):
|
|
@@ -35,7 +35,15 @@ def _get_icon(icon_str: str) -> Icon:
|
|
|
35
35
|
return Icon[icon_name]
|
|
36
36
|
|
|
37
37
|
|
|
38
|
+
def _get_color_str(color) -> str:
|
|
39
|
+
if isinstance(color, str):
|
|
40
|
+
if color[0] == '#':
|
|
41
|
+
return color
|
|
42
|
+
return str(color.value)
|
|
43
|
+
|
|
38
44
|
def _get_color(color_str: str) -> Color:
|
|
45
|
+
if color_str[0] == '#':
|
|
46
|
+
return color_str
|
|
39
47
|
color_name = color_str.upper().replace(" ", "_")
|
|
40
48
|
return Color[color_name]
|
|
41
49
|
|
|
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
21
21
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
SOFTWARE.
|
|
23
23
|
"""
|
|
24
|
-
from .control import Control, ControlConfig, _get_color, _get_icon, _get_device_view_style
|
|
24
|
+
from .control import Control, ControlConfig, _get_color, _get_icon, _get_device_view_style, _get_color_str
|
|
25
25
|
from .enums import Color, Icon, DeviceViewStyle
|
|
26
26
|
|
|
27
27
|
|
|
@@ -50,20 +50,20 @@ class DeviceViewConfig(ControlConfig):
|
|
|
50
50
|
super().__init__(control_id, title, control_position=None, title_position=None)
|
|
51
51
|
self.cfg["iconName"] = icon_name.value
|
|
52
52
|
self.cfg["style"] = str(style.value)
|
|
53
|
-
self.cfg["color"] =
|
|
53
|
+
self.cfg["color"] = _get_color_str(color)
|
|
54
54
|
self.cfg["shareColumn"] = share_column
|
|
55
55
|
if 1 <= num_columns <= 10:
|
|
56
56
|
self.cfg["numColumns"] = num_columns
|
|
57
57
|
else:
|
|
58
58
|
raise ValueError("num_columns must be in the range 1 to 10")
|
|
59
|
-
self.cfg["ctrlTitleBoxColor"] =
|
|
59
|
+
self.cfg["ctrlTitleBoxColor"] = _get_color_str(control_title_box_color)
|
|
60
60
|
if 0 <= control_title_box_transparency <= 100:
|
|
61
61
|
self.cfg["ctrlTitleBoxTransparency"] = control_title_box_transparency
|
|
62
62
|
else:
|
|
63
63
|
raise ValueError("Value must be in the range 0 to 100")
|
|
64
|
-
self.cfg["ctrlColor"] =
|
|
65
|
-
self.cfg["ctrlBorderColor"] =
|
|
66
|
-
self.cfg["ctrlBkgndColor"] =
|
|
64
|
+
self.cfg["ctrlColor"] = _get_color_str(control_color)
|
|
65
|
+
self.cfg["ctrlBorderColor"] = _get_color_str(control_border_color)
|
|
66
|
+
self.cfg["ctrlBkgndColor"] = _get_color_str(control_background_color)
|
|
67
67
|
self.cfg["ctrlTitleFontSize"] = control_title_font_size
|
|
68
68
|
self.cfg["ctrlMaxFontSize"] = control_max_font_size
|
|
69
69
|
if 0 <= control_background_transparency <= 100:
|
|
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
21
21
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
SOFTWARE.
|
|
23
23
|
"""
|
|
24
|
-
from .control import Control, ControlPosition, ControlConfig, _get_color, _get_title_position, _get_dial_number_position, _get_dial_style, _get_precision
|
|
24
|
+
from .control import Control, ControlPosition, ControlConfig, _get_color, _get_title_position, _get_dial_number_position, _get_dial_style, _get_precision, _get_color_str
|
|
25
25
|
from .enums import (Color, DialNumberPosition, DialStyle, Precision,
|
|
26
26
|
TitlePosition)
|
|
27
27
|
|
|
@@ -49,8 +49,8 @@ class DialConfig(ControlConfig):
|
|
|
49
49
|
self.cfg["min"] = dial_min
|
|
50
50
|
self.cfg["max"] = dial_max
|
|
51
51
|
self.cfg["redValue"] = red_value
|
|
52
|
-
self.cfg["dialFillColor"] =
|
|
53
|
-
self.cfg["pointerColor"] =
|
|
52
|
+
self.cfg["dialFillColor"] = _get_color_str(dial_fill_color)
|
|
53
|
+
self.cfg["pointerColor"] = _get_color_str(pointer_color)
|
|
54
54
|
self.cfg["numberPosition"] = number_position.value
|
|
55
55
|
self.cfg["showMinMax"] = show_min_max
|
|
56
56
|
self.cfg["style"] = style.value
|
|
@@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
22
22
|
SOFTWARE.
|
|
23
23
|
"""
|
|
24
24
|
from ..constants import BAD_CHARS
|
|
25
|
-
from .control import Control, ControlPosition, ControlConfig, _get_color, _get_title_position, _get_direction_style, _get_precision
|
|
25
|
+
from .control import Control, ControlPosition, ControlConfig, _get_color, _get_title_position, _get_direction_style, _get_precision, _get_color_str
|
|
26
26
|
from .enums import Color, DirectionStyle, Precision, TitlePosition
|
|
27
27
|
|
|
28
28
|
|
|
@@ -42,7 +42,7 @@ class DirectionConfig(ControlConfig):
|
|
|
42
42
|
) -> None:
|
|
43
43
|
super().__init__(control_id, title, control_position, title_position)
|
|
44
44
|
self.cfg["style"] = str(style.value)
|
|
45
|
-
self.cfg["pointerColor"] =
|
|
45
|
+
self.cfg["pointerColor"] = _get_color_str(pointer_color)
|
|
46
46
|
self.cfg["units"] = units
|
|
47
47
|
self.cfg["precision"] = precision.value
|
|
48
48
|
self.cfg["calAngle"] = calibration_angle
|
|
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
21
21
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
SOFTWARE.
|
|
23
23
|
"""
|
|
24
|
-
from .control import Control, ControlPosition, ControlConfig, _get_color, _get_title_position, _get_knob_style
|
|
24
|
+
from .control import Control, ControlPosition, ControlConfig, _get_color, _get_title_position, _get_knob_style, _get_color_str
|
|
25
25
|
from .enums import Color, KnobStyle, TitlePosition
|
|
26
26
|
|
|
27
27
|
|
|
@@ -51,8 +51,8 @@ class KnobConfig(ControlConfig):
|
|
|
51
51
|
self.cfg["showMinMax"] = show_min_max
|
|
52
52
|
self.cfg["sendOnlyOnRelease"] = send_only_on_release
|
|
53
53
|
self.cfg["dialFollowsKnob"] = dial_follows_knob
|
|
54
|
-
self.cfg["dialColor"] =
|
|
55
|
-
self.cfg["knobColor"] =
|
|
54
|
+
self.cfg["dialColor"] = _get_color_str(dial_color)
|
|
55
|
+
self.cfg["knobColor"] = _get_color_str(knob_color)
|
|
56
56
|
|
|
57
57
|
@classmethod
|
|
58
58
|
def from_dict(cls, cfg_dict: dict):
|
|
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
21
21
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
SOFTWARE.
|
|
23
23
|
"""
|
|
24
|
-
from .control import Control, ControlPosition, ControlConfig, _get_color, _get_title_position, _get_label_style
|
|
24
|
+
from .control import Control, ControlPosition, ControlConfig, _get_color, _get_title_position, _get_label_style, _get_color_str
|
|
25
25
|
from .enums import Color, LabelStyle, TitlePosition
|
|
26
26
|
|
|
27
27
|
|
|
@@ -38,7 +38,7 @@ class LabelConfig(ControlConfig):
|
|
|
38
38
|
) -> None:
|
|
39
39
|
super().__init__(control_id, title, control_position, title_position)
|
|
40
40
|
self.cfg["style"] = style.value
|
|
41
|
-
self.cfg["color"] =
|
|
41
|
+
self.cfg["color"] = _get_color_str(color)
|
|
42
42
|
|
|
43
43
|
@classmethod
|
|
44
44
|
def from_dict(cls, cfg_dict: dict):
|
|
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
21
21
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
SOFTWARE.
|
|
23
23
|
"""
|
|
24
|
-
from .control import Control, ControlPosition, ControlConfig, _get_title_position, _get_color, _get_bar_style
|
|
24
|
+
from .control import Control, ControlPosition, ControlConfig, _get_title_position, _get_color, _get_bar_style, _get_color_str
|
|
25
25
|
from .enums import Color, SliderBarStyle, TitlePosition
|
|
26
26
|
|
|
27
27
|
|
|
@@ -52,8 +52,8 @@ class SliderConfig(ControlConfig):
|
|
|
52
52
|
self.cfg["sliderEnabled"] = slider_enabled
|
|
53
53
|
self.cfg["sendOnlyOnRelease"] = send_only_on_release
|
|
54
54
|
self.cfg["barFollowsSlider"] = bar_follows_slider
|
|
55
|
-
self.cfg["barColor"] =
|
|
56
|
-
self.cfg["knobColor"] =
|
|
55
|
+
self.cfg["barColor"] = _get_color_str(bar_color)
|
|
56
|
+
self.cfg["knobColor"] = _get_color_str(knob_color)
|
|
57
57
|
self.cfg["barStyle"] = bar_style.value
|
|
58
58
|
|
|
59
59
|
@classmethod
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dashio-3.3.7 → dashio-3.3.9}/dashio/action_station_services/action_station_service_config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|