def test_if_fires_on_entity_change(self):
        self.hass.states.set('test.entity', 'hello')
        self.hass.pool.block_till_done()

        assert _setup_component(self.hass, automation.DOMAIN, {
            automation.DOMAIN: {
                'trigger': {
                    'platform': 'state',
                    'entity_id': 'test.entity',
                },
                'action': {
                    'service': 'test.automation',
                    'data_template': {
                        'some': '{{ trigger.%s }}' % '}} - {{ trigger.'.join((
                                    'platform', 'entity_id',
                                    'from_state.state', 'to_state.state',
                                    'for'))
                    },
                }
            }
        })

        self.hass.states.set('test.entity', 'world')
        self.hass.pool.block_till_done()
        self.assertEqual(1, len(self.calls))
        self.assertEqual(
            'state - test.entity - hello - world - None',
            self.calls[0].data['some'])
Check if host passes specified image properties.
dataset/ETHPy150Open home-assistant/home-assistant/tests/components/automation/test_state.py/TestAutomationState.test_if_fires_on_entity_change--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/scheduler/filters/image_props_filter.py/ImagePropertiesFilter.host_passes