@mock.patch('time.time')
    def test_report_with_binary_state(self, mock_time):
        mock_time.return_value = 12345
        state = ha.State('domain.entity', STATE_ON, {'foo': 1.0})
        with mock.patch.object(self.gf, '_send_to_graphite') as mock_send:
            self.gf._report_attributes('entity', state)
            expected = ['ha.entity.foo 1.000000 12345',
                        'ha.entity.state 1.000000 12345']
            actual = mock_send.call_args_list[0][0][0].split('\n')
            self.assertEqual(sorted(expected), sorted(actual))

        state.state = STATE_OFF
        with mock.patch.object(self.gf, '_send_to_graphite') as mock_send:
            self.gf._report_attributes('entity', state)
            expected = ['ha.entity.foo 1.000000 12345',
                        'ha.entity.state 0.000000 12345']
            actual = mock_send.call_args_list[0][0][0].split('\n')
            self.assertEqual(sorted(expected), sorted(actual))
:param options: dictionary containing the options
dataset/ETHPy150Open home-assistant/home-assistant/tests/components/test_graphite.py/TestGraphite.test_report_with_binary_state--crossover with--dataset/ETHPy150Open photo/openphoto-python/trovebox/api/api_base.py/ApiBase._build_option_string