|
3735 | 3735 | }), |
3736 | 3736 | ]) |
3737 | 3737 | # --- |
| 3738 | +# name: test_toggle_notifications[doors_open_on,kitchen_override_leds_reset][notification_info] |
| 3739 | + dict({ |
| 3740 | + 'expiration': ExpirationInfoSnapshot({ |
| 3741 | + 'cancel_listener': None, |
| 3742 | + 'expires_at': None, |
| 3743 | + 'started_at': HAFakeDatetime(2025, 5, 20, 3, 51, 32, 3245, tzinfo=zoneinfo.ZoneInfo(key='US/Pacific')), |
| 3744 | + }), |
| 3745 | + 'led_config_override': None, |
| 3746 | + 'notification_on': True, |
| 3747 | + }) |
| 3748 | +# --- |
| 3749 | +# name: test_toggle_notifications[doors_open_on,kitchen_override_leds_reset][sensor.kitchen_effect_brightness] |
| 3750 | + StateSnapshot({ |
| 3751 | + 'attributes': ReadOnlyDict({ |
| 3752 | + 'friendly_name': 'Kitchen Effect brightness', |
| 3753 | + 'icon': 'mdi:timer', |
| 3754 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 3755 | + 'unit_of_measurement': '%', |
| 3756 | + }), |
| 3757 | + 'context': <ANY>, |
| 3758 | + 'entity_id': 'sensor.kitchen_effect_brightness', |
| 3759 | + 'last_changed': <ANY>, |
| 3760 | + 'last_reported': <ANY>, |
| 3761 | + 'last_updated': <ANY>, |
| 3762 | + 'state': '100.0', |
| 3763 | + }) |
| 3764 | +# --- |
| 3765 | +# name: test_toggle_notifications[doors_open_on,kitchen_override_leds_reset][sensor.kitchen_effect_color] |
| 3766 | + StateSnapshot({ |
| 3767 | + 'attributes': ReadOnlyDict({ |
| 3768 | + 'friendly_name': 'Kitchen Effect color', |
| 3769 | + 'icon': 'mdi:palette', |
| 3770 | + }), |
| 3771 | + 'context': <ANY>, |
| 3772 | + 'entity_id': 'sensor.kitchen_effect_color', |
| 3773 | + 'last_changed': <ANY>, |
| 3774 | + 'last_reported': <ANY>, |
| 3775 | + 'last_updated': <ANY>, |
| 3776 | + 'state': 'red', |
| 3777 | + }) |
| 3778 | +# --- |
| 3779 | +# name: test_toggle_notifications[doors_open_on,kitchen_override_leds_reset][sensor.kitchen_effect_duration] |
| 3780 | + StateSnapshot({ |
| 3781 | + 'attributes': ReadOnlyDict({ |
| 3782 | + 'friendly_name': 'Kitchen Effect duration', |
| 3783 | + 'icon': 'mdi:timer', |
| 3784 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 3785 | + 'unit_of_measurement': <UnitOfTime.SECONDS: 's'>, |
| 3786 | + }), |
| 3787 | + 'context': <ANY>, |
| 3788 | + 'entity_id': 'sensor.kitchen_effect_duration', |
| 3789 | + 'last_changed': <ANY>, |
| 3790 | + 'last_reported': <ANY>, |
| 3791 | + 'last_updated': <ANY>, |
| 3792 | + 'state': 'unknown', |
| 3793 | + }) |
| 3794 | +# --- |
| 3795 | +# name: test_toggle_notifications[doors_open_on,kitchen_override_leds_reset][sensor.kitchen_effect_type] |
| 3796 | + StateSnapshot({ |
| 3797 | + 'attributes': ReadOnlyDict({ |
| 3798 | + 'friendly_name': 'Kitchen Effect type', |
| 3799 | + 'icon': 'mdi:lightning-bolt', |
| 3800 | + }), |
| 3801 | + 'context': <ANY>, |
| 3802 | + 'entity_id': 'sensor.kitchen_effect_type', |
| 3803 | + 'last_changed': <ANY>, |
| 3804 | + 'last_reported': <ANY>, |
| 3805 | + 'last_updated': <ANY>, |
| 3806 | + 'state': 'open_close', |
| 3807 | + }) |
| 3808 | +# --- |
| 3809 | +# name: test_toggle_notifications[doors_open_on,kitchen_override_leds_reset][sensor.kitchen_notification] |
| 3810 | + StateSnapshot({ |
| 3811 | + 'attributes': ReadOnlyDict({ |
| 3812 | + 'friendly_name': 'Kitchen Notification', |
| 3813 | + 'icon': 'mdi:circle-box', |
| 3814 | + }), |
| 3815 | + 'context': <ANY>, |
| 3816 | + 'entity_id': 'sensor.kitchen_notification', |
| 3817 | + 'last_changed': <ANY>, |
| 3818 | + 'last_reported': <ANY>, |
| 3819 | + 'last_updated': <ANY>, |
| 3820 | + 'state': 'doors_open', |
| 3821 | + }) |
| 3822 | +# --- |
| 3823 | +# name: test_toggle_notifications[doors_open_on,kitchen_override_leds_reset][service_calls] |
| 3824 | + list([ |
| 3825 | + ]) |
| 3826 | +# --- |
| 3827 | +# name: test_toggle_notifications[doors_open_on,kitchen_override_leds_reset][switch.doors_open_notification] |
| 3828 | + StateSnapshot({ |
| 3829 | + 'attributes': ReadOnlyDict({ |
| 3830 | + 'friendly_name': 'Doors Open Notification', |
| 3831 | + 'icon': 'mdi:circle-box', |
| 3832 | + }), |
| 3833 | + 'context': <ANY>, |
| 3834 | + 'entity_id': 'switch.doors_open_notification', |
| 3835 | + 'last_changed': <ANY>, |
| 3836 | + 'last_reported': <ANY>, |
| 3837 | + 'last_updated': <ANY>, |
| 3838 | + 'state': 'on', |
| 3839 | + }) |
| 3840 | +# --- |
| 3841 | +# name: test_toggle_notifications[doors_open_on,kitchen_override_leds_reset][switch_info] |
| 3842 | + dict({ |
| 3843 | + 'disable_clear_notification_id': 'switch.kitchen_disable_config_2x_tap_to_clear_notifications', |
| 3844 | + 'expiration': ExpirationInfoSnapshot({ |
| 3845 | + 'cancel_listener': None, |
| 3846 | + 'expires_at': None, |
| 3847 | + 'started_at': HAFakeDatetime(2025, 5, 20, 3, 51, 32, 3245, tzinfo=zoneinfo.ZoneInfo(key='US/Pacific')), |
| 3848 | + }), |
| 3849 | + 'led_config': tuple( |
| 3850 | + dict({ |
| 3851 | + 'brightness': 100.0, |
| 3852 | + 'color': <Color.RED: 0>, |
| 3853 | + 'duration': None, |
| 3854 | + 'effect': <Effect.OPEN_CLOSE: 6>, |
| 3855 | + }), |
| 3856 | + ), |
| 3857 | + 'led_config_source': dict({ |
| 3858 | + 'type': <LEDConfigSourceType.NOTIFICATION: 'notification'>, |
| 3859 | + 'value': 'doors_open', |
| 3860 | + }), |
| 3861 | + 'local_protetction_id': 'switch.kitchen_local_protection', |
| 3862 | + 'priorities': tuple( |
| 3863 | + 'doors_open', |
| 3864 | + ), |
| 3865 | + }) |
| 3866 | +# --- |
| 3867 | +# name: test_toggle_notifications[doors_open_on,kitchen_override_leds_reset][zha_cluster_commands] |
| 3868 | + list([ |
| 3869 | + ServiceCallSnapshot({ |
| 3870 | + 'context': <ANY>, |
| 3871 | + 'data': ReadOnlyDict({ |
| 3872 | + 'cluster_id': 64561, |
| 3873 | + 'cluster_type': 'in', |
| 3874 | + 'command': 1, |
| 3875 | + 'command_type': 'server', |
| 3876 | + 'endpoint_id': 1, |
| 3877 | + 'ieee': 'mock-ieee:kitchen', |
| 3878 | + 'manufacturer': 4655, |
| 3879 | + 'params': dict({ |
| 3880 | + 'led_color': 0, |
| 3881 | + 'led_duration': 255, |
| 3882 | + 'led_effect': 6, |
| 3883 | + 'led_level': 100, |
| 3884 | + }), |
| 3885 | + }), |
| 3886 | + 'domain': 'zha', |
| 3887 | + 'hass': <ANY>, |
| 3888 | + 'return_response': False, |
| 3889 | + 'service': 'issue_zigbee_cluster_command', |
| 3890 | + }), |
| 3891 | + ServiceCallSnapshot({ |
| 3892 | + 'context': <ANY>, |
| 3893 | + 'data': ReadOnlyDict({ |
| 3894 | + 'cluster_id': 64561, |
| 3895 | + 'cluster_type': 'in', |
| 3896 | + 'command': 1, |
| 3897 | + 'command_type': 'server', |
| 3898 | + 'endpoint_id': 1, |
| 3899 | + 'ieee': 'mock-ieee:kitchen', |
| 3900 | + 'manufacturer': 4655, |
| 3901 | + 'params': dict({ |
| 3902 | + 'led_color': 90, |
| 3903 | + 'led_duration': 255, |
| 3904 | + 'led_effect': 1, |
| 3905 | + 'led_level': 100, |
| 3906 | + }), |
| 3907 | + }), |
| 3908 | + 'domain': 'zha', |
| 3909 | + 'hass': <ANY>, |
| 3910 | + 'return_response': False, |
| 3911 | + 'service': 'issue_zigbee_cluster_command', |
| 3912 | + }), |
| 3913 | + ServiceCallSnapshot({ |
| 3914 | + 'context': <ANY>, |
| 3915 | + 'data': ReadOnlyDict({ |
| 3916 | + 'cluster_id': 64561, |
| 3917 | + 'cluster_type': 'in', |
| 3918 | + 'command': 1, |
| 3919 | + 'command_type': 'server', |
| 3920 | + 'endpoint_id': 1, |
| 3921 | + 'ieee': 'mock-ieee:kitchen', |
| 3922 | + 'manufacturer': 4655, |
| 3923 | + 'params': dict({ |
| 3924 | + 'led_color': 0, |
| 3925 | + 'led_duration': 255, |
| 3926 | + 'led_effect': 6, |
| 3927 | + 'led_level': 100, |
| 3928 | + }), |
| 3929 | + }), |
| 3930 | + 'domain': 'zha', |
| 3931 | + 'hass': <ANY>, |
| 3932 | + 'return_response': False, |
| 3933 | + 'service': 'issue_zigbee_cluster_command', |
| 3934 | + }), |
| 3935 | + ]) |
| 3936 | +# --- |
3738 | 3937 | # name: test_toggle_notifications[doors_open_various_firmware_durations_expired][events] |
3739 | 3938 | list([ |
3740 | 3939 | EventSnapshot({ |
|
0 commit comments