Skip to content

Convert brightness to float #100

Convert brightness to float

Convert brightness to float #100

GitHub Actions / JUnit Test Report failed Oct 15, 2024 in 0s

64 tests run, 61 passed, 0 skipped, 3 failed.

Annotations

Check failure on line 43 in tests/test_movement_detector.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_movement_detector.test_initial_state

AssertionError: assert 1.6 == '1.6'
 +  where 1.6 = <abbfreeathome.devices.movement_detector.MovementDetector object at 0x7f1d86dd9ee0>.brightness
Raw output
movement_detector = <abbfreeathome.devices.movement_detector.MovementDetector object at 0x7f1d86dd9ee0>

    @pytest.mark.asyncio
    async def test_initial_state(movement_detector):
        """Test the intial state of the switch."""
>       assert movement_detector.brightness == "1.6"
E       AssertionError: assert 1.6 == '1.6'
E        +  where 1.6 = <abbfreeathome.devices.movement_detector.MovementDetector object at 0x7f1d86dd9ee0>.brightness

tests/test_movement_detector.py:43: AssertionError

Check failure on line 51 in tests/test_movement_detector.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_movement_detector.test_refresh_state

AssertionError: assert 72.0 == '72.0'
 +  where 72.0 = <abbfreeathome.devices.movement_detector.MovementDetector object at 0x7f1d86de1610>.brightness
Raw output
movement_detector = <abbfreeathome.devices.movement_detector.MovementDetector object at 0x7f1d86de1610>

    @pytest.mark.asyncio
    async def test_refresh_state(movement_detector):
        """Test refreshing the state of the switch."""
        movement_detector._api.get_datapoint.return_value = ["72.0"]
        await movement_detector.refresh_state()
>       assert movement_detector.brightness == "72.0"
E       AssertionError: assert 72.0 == '72.0'
E        +  where 72.0 = <abbfreeathome.devices.movement_detector.MovementDetector object at 0x7f1d86de1610>.brightness

tests/test_movement_detector.py:51: AssertionError

Check failure on line 66 in tests/test_movement_detector.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_movement_detector.test_refresh_state_from_output

AssertionError: assert 52.3 == '52.3'
 +  where 52.3 = <abbfreeathome.devices.movement_detector.MovementDetector object at 0x7f1d86de17f0>.brightness
Raw output
movement_detector = <abbfreeathome.devices.movement_detector.MovementDetector object at 0x7f1d86de17f0>

    def test_refresh_state_from_output(movement_detector):
        """Test the _refresh_state_from_output function."""
    
        # Check output that affects the state.
        movement_detector._refresh_state_from_output(
            output={"pairingID": 1027, "value": "52.3"},
        )
>       assert movement_detector.brightness == "52.3"
E       AssertionError: assert 52.3 == '52.3'
E        +  where 52.3 = <abbfreeathome.devices.movement_detector.MovementDetector object at 0x7f1d86de17f0>.brightness

tests/test_movement_detector.py:66: AssertionError