41f205e09d54a968f162dd36c63c3641a703b672,homeassistant/components/switch/template.py,SwitchTemplate,update,#SwitchTemplate#,136

Before Change


        try:
            self._value = template.render(self.hass, self._template)
            if not self.available:
                _LOGGER.error(
                    "`%s` is not a switch state, setting %s to unavailable",
                    self._value, self.entity_id)

        except TemplateError as ex:
            self._value = STATE_ERROR
            _LOGGER.error(ex)

After Change


            else:
                _LOGGER.error(
                    "Received invalid switch is_on state: %s. Expected: %s",
                    state, ", ".join(_VALID_STATES))
                self._state = None

        except TemplateError as ex:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: home-assistant/home-assistant
Commit Name: 41f205e09d54a968f162dd36c63c3641a703b672
Time: 2016-03-24
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/switch/template.py
Class Name: SwitchTemplate
Method Name: update


Project Name: tensorflow/tensorflow
Commit Name: 3d03ae2086b232cb6803507ae4defd997c256ec9
Time: 2020-11-18
Author: crccw@google.com
File Name: tensorflow/python/distribute/multi_process_lib.py
Class Name:
Method Name: _set_spawn_exe_path


Project Name: home-assistant/home-assistant
Commit Name: bfb5089ed59f1df8cf53a3b517ac6b091f539a26
Time: 2015-03-08
Author: andyt05@gmail.com
File Name: homeassistant/components/device_tracker/nmap_tracker.py
Class Name: NmapDeviceScanner
Method Name: _update_info