|
50 | 50 | # day's forecast high temperature. ('%%d:733695023:d01_temperatureHigh%%', 'blue'). Note
|
51 | 51 | # that this is non-trivial because it requires a round-trip outside the class. Needs a
|
52 | 52 | # pipe to send things to the host plugin and get a response.
|
53 |
| -# TODO: we use `dev.pluginProps.get() which likely involves a round trip to the server. Can we load |
54 |
| -# the props once per refresh to speed things up? |
55 | 53 | # ================================== IMPORTS ==================================
|
56 | 54 |
|
57 | 55 | try:
|
|
101 | 99 | __license__ = Dave.__license__
|
102 | 100 | __build__ = Dave.__build__
|
103 | 101 | __title__ = "Matplotlib Plugin for Indigo Home Control"
|
104 |
| -__version__ = "0.8.26" |
| 102 | +__version__ = "0.8.27" |
105 | 103 |
|
106 | 104 | # =============================================================================
|
107 | 105 |
|
@@ -571,8 +569,6 @@ def shutdown(self):
|
571 | 569 | # =============================================================================
|
572 | 570 | def validatePrefsConfigUi(self, values_dict=None):
|
573 | 571 |
|
574 |
| - changed_keys = () |
575 |
| - config_changed = False |
576 | 572 | error_msg_dict = indigo.Dict()
|
577 | 573 |
|
578 | 574 | self.debug_level = int(values_dict['showDebugLevel'])
|
@@ -649,6 +645,9 @@ def validatePrefsConfigUi(self, values_dict=None):
|
649 | 645 | # TODO: consider adding this feature to DLFramework and including in all plugins.
|
650 | 646 | # ============================== Log All Changes ==============================
|
651 | 647 | # Log any changes to the plugin preferences.
|
| 648 | + changed_keys = () |
| 649 | + config_changed = False |
| 650 | + |
652 | 651 | for key in values_dict.keys():
|
653 | 652 | try:
|
654 | 653 | if values_dict[key] != self.pluginPrefs[key]:
|
@@ -1096,10 +1095,6 @@ def audit_csv_health(self):
|
1096 | 1095 | for thing in column_dict.items():
|
1097 | 1096 | full_path = data_path + thing[1][0] + ".csv"
|
1098 | 1097 |
|
1099 |
| - # TODO: does it make sense to combine this with the check that happens at CSV device refresh? |
1100 |
| - # could do passed device or if no passed device do all devices. Note that they are |
1101 |
| - # constructed slightly differently now. |
1102 |
| - |
1103 | 1098 | # ============================= Create (if needed) ============================
|
1104 | 1099 | # If the appropriate CSV file doesn't exist, create it and write the header
|
1105 | 1100 | # line.
|
@@ -1146,8 +1141,6 @@ def audit_device_props(self):
|
1146 | 1141 | :return:
|
1147 | 1142 | """
|
1148 | 1143 | # TODO: migrate this to DLFramework
|
1149 |
| - # TODO: add facility to compare current value to available values (i.e., a |
1150 |
| - # control value is no longer an available option.) |
1151 | 1144 |
|
1152 | 1145 | import xml.etree.ElementTree as eTree
|
1153 | 1146 |
|
@@ -3149,7 +3142,7 @@ def chart_area(self, dev, p_dict, k_dict, return_queue):
|
3149 | 3142 | p_dict['area{0}MarkerColor'.format(area)] = r"#{0}".format(p_dict['area{0}MarkerColor'.format(area)].replace(' ', '').replace('#', ''))
|
3150 | 3143 |
|
3151 | 3144 | # If area color is the same as the background color, alert the user.
|
3152 |
| - if p_dict['area{0}Color'.format(area)] == p_dict['backgroundColor']: |
| 3145 | + if p_dict['area{0}Color'.format(area)] == p_dict['backgroundColor'] and not suppress_area: |
3153 | 3146 | log['Warning'].append(u"[{0}] Area {1} color is the same as the background color (so you may not be able to see it).".format(dev.name, area))
|
3154 | 3147 |
|
3155 | 3148 | # If the area is suppressed, remind the user they suppressed it.
|
@@ -3374,7 +3367,7 @@ def chart_bar(self, dev, p_dict, k_dict, return_queue):
|
3374 | 3367 | p_dict['bar{0}Color'.format(thing)] = r"#{0}".format(p_dict['bar{0}Color'.format(thing)].replace(' ', '').replace('#', ''))
|
3375 | 3368 |
|
3376 | 3369 | # If the bar color is the same as the background color, alert the user.
|
3377 |
| - if p_dict['bar{0}Color'.format(thing)] == p_dict['backgroundColor']: |
| 3370 | + if p_dict['bar{0}Color'.format(thing)] == p_dict['backgroundColor'] and not suppress_bar: |
3378 | 3371 | log['Info'].append(u"[{0}] Bar {1} color is the same as the background color (so you may not be able to see it).".format(dev.name, thing))
|
3379 | 3372 |
|
3380 | 3373 | # If the bar is suppressed, remind the user they suppressed it.
|
@@ -3794,7 +3787,7 @@ def chart_line(self, dev, p_dict, k_dict, return_queue):
|
3794 | 3787 | p_dict['line{0}BestFitColor'.format(line)] = r"#{0}".format(p_dict['line{0}BestFitColor'.format(line)].replace(' ', '').replace('#', ''))
|
3795 | 3788 |
|
3796 | 3789 | # If line color is the same as the background color, alert the user.
|
3797 |
| - if p_dict['line{0}Color'.format(line)] == p_dict['backgroundColor']: |
| 3790 | + if p_dict['line{0}Color'.format(line)] == p_dict['backgroundColor'] and not suppress_line: |
3798 | 3791 | log['Warning'].append(u"[{0}] Line {1} color is the same as the background color (so you may not be able to see it).".format(dev.name, line))
|
3799 | 3792 |
|
3800 | 3793 | # If the line is suppressed, remind the user they suppressed it.
|
@@ -4263,7 +4256,7 @@ def chart_scatter(self, dev, p_dict, k_dict, return_queue):
|
4263 | 4256 | p_dict['line{0}BestFitColor'.format(thing)] = r"#{0}".format(p_dict['line{0}BestFitColor'.format(thing)].replace(' ', '').replace('#', 'FF 00 00'))
|
4264 | 4257 |
|
4265 | 4258 | # If dot color is the same as the background color, alert the user.
|
4266 |
| - if p_dict['group{0}Color'.format(thing)] == p_dict['backgroundColor']: |
| 4259 | + if p_dict['group{0}Color'.format(thing)] == p_dict['backgroundColor'] and not suppress_group: |
4267 | 4260 | log['Debug'].append(u"[{0}] Group {1} color is the same as the background color (so you may not be able to see it).".format(dev.name, thing))
|
4268 | 4261 |
|
4269 | 4262 | # If the group is suppressed, remind the user they suppressed it.
|
@@ -4412,7 +4405,6 @@ def chart_weather_composite(self, dev, dev_type, p_dict, k_dict, state_list, ret
|
4412 | 4405 | -----
|
4413 | 4406 |
|
4414 | 4407 | """
|
4415 |
| - # TODO: Make a collapsible section to set min/max Y ranges for each distinct range [temp, humidity, pressure, wind, precip] |
4416 | 4408 | dpi = int(plt.rcParams['savefig.dpi'])
|
4417 | 4409 | forecast_length = {'Daily': 8, 'Hourly': 24, 'wundergroundTenDay': 10, 'wundergroundHourly': 24}
|
4418 | 4410 | height = int(dev.pluginProps['height'])
|
|
0 commit comments