|
6241 | 6241 | 'script', |
6242 | 6242 | 'block_activation', |
6243 | 6243 | dict({ |
| 6244 | + 'leds': list([ |
| 6245 | + dict({ |
| 6246 | + 'brightness': 100.0, |
| 6247 | + 'color': 'red', |
| 6248 | + 'duration': None, |
| 6249 | + 'effect': 'open_close', |
| 6250 | + }), |
| 6251 | + ]), |
6244 | 6252 | 'notification': 'doors_open', |
6245 | 6253 | }), |
6246 | 6254 | ), |
|
6516 | 6524 | 'script', |
6517 | 6525 | 'color_override', |
6518 | 6526 | dict({ |
| 6527 | + 'leds': list([ |
| 6528 | + dict({ |
| 6529 | + 'brightness': 100.0, |
| 6530 | + 'color': 'red', |
| 6531 | + 'duration': None, |
| 6532 | + 'effect': 'open_close', |
| 6533 | + }), |
| 6534 | + ]), |
6519 | 6535 | 'notification': 'doors_open', |
6520 | 6536 | }), |
6521 | 6537 | ), |
|
6561 | 6577 | }), |
6562 | 6578 | ]) |
6563 | 6579 | # --- |
| 6580 | +# name: test_toggle_notification_with_actions[color_override_reactivated][sensor.kitchen_effect_brightness] |
| 6581 | + StateSnapshot({ |
| 6582 | + 'attributes': ReadOnlyDict({ |
| 6583 | + 'friendly_name': 'Kitchen Effect brightness', |
| 6584 | + 'icon': 'mdi:brightness-percent', |
| 6585 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 6586 | + 'unit_of_measurement': '%', |
| 6587 | + }), |
| 6588 | + 'context': <ANY>, |
| 6589 | + 'entity_id': 'sensor.kitchen_effect_brightness', |
| 6590 | + 'last_changed': <ANY>, |
| 6591 | + 'last_reported': <ANY>, |
| 6592 | + 'last_updated': <ANY>, |
| 6593 | + 'state': '100.0', |
| 6594 | + }) |
| 6595 | +# --- |
| 6596 | +# name: test_toggle_notification_with_actions[color_override_reactivated][sensor.kitchen_effect_color] |
| 6597 | + StateSnapshot({ |
| 6598 | + 'attributes': ReadOnlyDict({ |
| 6599 | + 'friendly_name': 'Kitchen Effect color', |
| 6600 | + 'icon': 'mdi:palette', |
| 6601 | + }), |
| 6602 | + 'context': <ANY>, |
| 6603 | + 'entity_id': 'sensor.kitchen_effect_color', |
| 6604 | + 'last_changed': <ANY>, |
| 6605 | + 'last_reported': <ANY>, |
| 6606 | + 'last_updated': <ANY>, |
| 6607 | + 'state': 'cyan', |
| 6608 | + }) |
| 6609 | +# --- |
| 6610 | +# name: test_toggle_notification_with_actions[color_override_reactivated][sensor.kitchen_effect_duration] |
| 6611 | + StateSnapshot({ |
| 6612 | + 'attributes': ReadOnlyDict({ |
| 6613 | + 'friendly_name': 'Kitchen Effect duration', |
| 6614 | + 'icon': 'mdi:timer', |
| 6615 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 6616 | + 'unit_of_measurement': <UnitOfTime.SECONDS: 's'>, |
| 6617 | + }), |
| 6618 | + 'context': <ANY>, |
| 6619 | + 'entity_id': 'sensor.kitchen_effect_duration', |
| 6620 | + 'last_changed': <ANY>, |
| 6621 | + 'last_reported': <ANY>, |
| 6622 | + 'last_updated': <ANY>, |
| 6623 | + 'state': 'unknown', |
| 6624 | + }) |
| 6625 | +# --- |
| 6626 | +# name: test_toggle_notification_with_actions[color_override_reactivated][sensor.kitchen_effect_type] |
| 6627 | + StateSnapshot({ |
| 6628 | + 'attributes': ReadOnlyDict({ |
| 6629 | + 'friendly_name': 'Kitchen Effect type', |
| 6630 | + 'icon': 'mdi:star-four-points-box', |
| 6631 | + }), |
| 6632 | + 'context': <ANY>, |
| 6633 | + 'entity_id': 'sensor.kitchen_effect_type', |
| 6634 | + 'last_changed': <ANY>, |
| 6635 | + 'last_reported': <ANY>, |
| 6636 | + 'last_updated': <ANY>, |
| 6637 | + 'state': 'solid', |
| 6638 | + }) |
| 6639 | +# --- |
| 6640 | +# name: test_toggle_notification_with_actions[color_override_reactivated][sensor.kitchen_notification] |
| 6641 | + StateSnapshot({ |
| 6642 | + 'attributes': ReadOnlyDict({ |
| 6643 | + 'friendly_name': 'Kitchen Notification', |
| 6644 | + 'icon': 'mdi:circle-box', |
| 6645 | + }), |
| 6646 | + 'context': <ANY>, |
| 6647 | + 'entity_id': 'sensor.kitchen_notification', |
| 6648 | + 'last_changed': <ANY>, |
| 6649 | + 'last_reported': <ANY>, |
| 6650 | + 'last_updated': <ANY>, |
| 6651 | + 'state': 'doors_open', |
| 6652 | + }) |
| 6653 | +# --- |
| 6654 | +# name: test_toggle_notification_with_actions[color_override_reactivated][service_calls] |
| 6655 | + list([ |
| 6656 | + tuple( |
| 6657 | + 'script', |
| 6658 | + 'color_override', |
| 6659 | + dict({ |
| 6660 | + 'leds': list([ |
| 6661 | + dict({ |
| 6662 | + 'brightness': 100.0, |
| 6663 | + 'color': 'red', |
| 6664 | + 'duration': None, |
| 6665 | + 'effect': 'open_close', |
| 6666 | + }), |
| 6667 | + ]), |
| 6668 | + 'notification': 'doors_open', |
| 6669 | + }), |
| 6670 | + ), |
| 6671 | + tuple( |
| 6672 | + 'script', |
| 6673 | + 'color_override', |
| 6674 | + dict({ |
| 6675 | + 'leds': list([ |
| 6676 | + dict({ |
| 6677 | + 'brightness': 100.0, |
| 6678 | + 'color': 'cyan', |
| 6679 | + 'duration': None, |
| 6680 | + 'effect': 'solid', |
| 6681 | + }), |
| 6682 | + ]), |
| 6683 | + 'notification': 'doors_open', |
| 6684 | + }), |
| 6685 | + ), |
| 6686 | + ]) |
| 6687 | +# --- |
| 6688 | +# name: test_toggle_notification_with_actions[color_override_reactivated][switch.doors_open_notification] |
| 6689 | + StateSnapshot({ |
| 6690 | + 'attributes': ReadOnlyDict({ |
| 6691 | + 'friendly_name': 'Doors Open Notification', |
| 6692 | + 'icon': 'mdi:circle-box', |
| 6693 | + }), |
| 6694 | + 'context': <ANY>, |
| 6695 | + 'entity_id': 'switch.doors_open_notification', |
| 6696 | + 'last_changed': <ANY>, |
| 6697 | + 'last_reported': <ANY>, |
| 6698 | + 'last_updated': <ANY>, |
| 6699 | + 'state': 'on', |
| 6700 | + }) |
| 6701 | +# --- |
| 6702 | +# name: test_toggle_notification_with_actions[color_override_reactivated][zha_cluster_commands] |
| 6703 | + list([ |
| 6704 | + ServiceCallSnapshot({ |
| 6705 | + 'context': <ANY>, |
| 6706 | + 'data': ReadOnlyDict({ |
| 6707 | + 'cluster_id': 64561, |
| 6708 | + 'cluster_type': 'in', |
| 6709 | + 'command': 1, |
| 6710 | + 'command_type': 'server', |
| 6711 | + 'endpoint_id': 1, |
| 6712 | + 'ieee': 'mock-ieee:kitchen', |
| 6713 | + 'manufacturer': 4655, |
| 6714 | + 'params': dict({ |
| 6715 | + 'led_color': 130, |
| 6716 | + 'led_duration': 255, |
| 6717 | + 'led_effect': 1, |
| 6718 | + 'led_level': 100, |
| 6719 | + }), |
| 6720 | + }), |
| 6721 | + 'domain': 'zha', |
| 6722 | + 'hass': <ANY>, |
| 6723 | + 'return_response': False, |
| 6724 | + 'service': 'issue_zigbee_cluster_command', |
| 6725 | + }), |
| 6726 | + ]) |
| 6727 | +# --- |
6564 | 6728 | # name: test_toggle_notification_with_actions[single_led_change][sensor.kitchen_effect_brightness] |
6565 | 6729 | StateSnapshot({ |
6566 | 6730 | 'attributes': ReadOnlyDict({ |
|
6677 | 6841 | 'script', |
6678 | 6842 | 'color_from_input', |
6679 | 6843 | dict({ |
| 6844 | + 'leds': list([ |
| 6845 | + dict({ |
| 6846 | + 'brightness': 100.0, |
| 6847 | + 'color': 'orange', |
| 6848 | + 'duration': None, |
| 6849 | + 'effect': 'slow_blink', |
| 6850 | + }), |
| 6851 | + ]), |
6680 | 6852 | 'notification': 'windows_open', |
6681 | 6853 | }), |
6682 | 6854 | ), |
6683 | 6855 | tuple( |
6684 | 6856 | 'script', |
6685 | 6857 | 'color_from_input', |
6686 | 6858 | dict({ |
| 6859 | + 'leds': list([ |
| 6860 | + dict({ |
| 6861 | + 'brightness': 100.0, |
| 6862 | + 'color': 'red', |
| 6863 | + 'duration': None, |
| 6864 | + 'effect': 'open_close', |
| 6865 | + }), |
| 6866 | + ]), |
6687 | 6867 | 'notification': 'doors_open', |
6688 | 6868 | }), |
6689 | 6869 | ), |
|
0 commit comments