Esempio n. 1
0
 def test_if_fails_setup_if_from_boolean_value(self):
     self.assertFalse(state.trigger(
         self.hass, {
             'platform': 'state',
             'entity_id': 'test.entity',
             'from': True,
         }, lambda x: x))
Esempio n. 2
0
 def test_if_fails_setup_if_from_boolean_value(self):
     self.assertFalse(
         state.trigger(self.hass, {
             'platform': 'state',
             'entity_id': 'test.entity',
             'from': True,
         }, lambda x: x))
Esempio n. 3
0
 def test_if_fails_setup_if_to_boolean_value(self):
     """Test for setup failure for boolean to."""
     self.assertFalse(state.trigger(
         self.hass, {
             'platform': 'state',
             'entity_id': 'test.entity',
             'to': True,
         }, lambda x: x))
Esempio n. 4
0
 def test_if_fails_setup_if_to_boolean_value(self):
     """Test for setup failure for boolean to."""
     self.assertFalse(state.trigger(
         self.hass, {
             'platform': 'state',
             'entity_id': 'test.entity',
             'to': True,
         }, lambda x: x))
Esempio n. 5
0
 def test_if_fails_setup_for_without_to(self):
     self.assertFalse(state.trigger(
         self.hass, {
             'platform': 'state',
             'entity_id': 'test.entity',
             'for': {
                 'seconds': 5
             },
         }, lambda x: x))
Esempio n. 6
0
 def test_if_fails_setup_bad_for(self):
     self.assertFalse(state.trigger(
         self.hass, {
             'platform': 'state',
             'entity_id': 'test.entity',
             'to': 'world',
             'for': {
                 'invalid': 5
             },
         }, lambda x: x))
Esempio n. 7
0
 def test_if_fails_setup_for_without_to(self):
     self.assertFalse(
         state.trigger(
             self.hass, {
                 'platform': 'state',
                 'entity_id': 'test.entity',
                 'for': {
                     'seconds': 5
                 },
             }, lambda x: x))
Esempio n. 8
0
 def test_if_fails_setup_bad_for(self):
     self.assertFalse(
         state.trigger(
             self.hass, {
                 'platform': 'state',
                 'entity_id': 'test.entity',
                 'to': 'world',
                 'for': {
                     'invalid': 5
                 },
             }, lambda x: x))