Overview
Comment: | Ensure on/off are delivered |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
1b6d5a20232074f78947b16b377618b2 |
User & Date: | rkeene on 2020-04-28 16:58:35 |
Other Links: | manifest | tags |
Context
2020-04-28
| ||
17:31 | Implemented pair/unpair check-in: 79fb8a5f22 user: rkeene tags: trunk | |
16:58 | Ensure on/off are delivered check-in: 1b6d5a2023 user: rkeene tags: trunk | |
16:39 | Corrected color computation check-in: 4631f6c93e user: rkeene tags: trunk | |
Changes
Modified __init__.py from [d36207e003] to [c1c96d59b0].
︙ | |||
332 333 334 335 336 337 338 | 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | + + + + + + + + + - - + + | else: self._message_id = button_info['message_id'] # Compute message message = self._compute_button_message(button_info) # Transmit if 'delay' in button_info: delay = button_info['delay'] else: delay = self._config['delay'] if 'retries' in button_info: retries = button_info['retries'] else: retries = self._config['retries'] |
︙ | |||
400 401 402 403 404 405 406 | 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | - - | return True def _step_brightness(self, brightness, brightness_min, brightness_max, zone = None): # Select the appropriate zone before sending the steps # to ensure they reach the correct bulbs self.on(zone) |
︙ | |||
457 458 459 460 461 462 463 | 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | - - - | color = int(color + 0.5) self._debug("RGB = \x1b[38;2;%i;%i;%im%06x\x1b[0m; Hue = %s; Color = %i" % (r, g, b, rgb, str(h * 360), color)) return color |
︙ | |||
516 517 518 519 520 521 522 | 520 521 522 523 524 525 526 527 528 529 530 531 532 533 | - | # If the bulbs do not support color, nothing needs to be done if 'has_color' not in self._config['features']: return False # Turn on the appropriate zone to select it self.on(zone) |
︙ | |||
551 552 553 554 555 556 557 558 559 560 561 | 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 | + + + + + + - + + + + + + + + + | if zone is None: message = {'button': 'on'} else: message = { 'button': 'zone_on', 'zone': zone } # Increase retries and delay for on/off to ensure # that these important messages are delivered message['retries'] = 15 message['delay'] = 0.2 return self._send_button(message) def off(self, zone = None): if zone is None: |
︙ |