diff --git a/.rubocop.yml b/.rubocop.yml index 1b1b0ca..241bdb0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ Metrics/LineLength: Max: 140 Metrics/MethodLength: - Max: 25 + Max: 35 Metrics/ClassLength: Max: 200 diff --git a/lib/home_assistant/ble.rb b/lib/home_assistant/ble.rb index bf8ed7e..ffb6d09 100644 --- a/lib/home_assistant/ble.rb +++ b/lib/home_assistant/ble.rb @@ -120,6 +120,7 @@ def update_home_assistant(ha_conf, state) uri = URI.join(home_assistant_url, '/api/services/device_tracker/see') request = Net::HTTP::Post.new(uri) request.content_type = 'application/json' + request['Accept-Encoding'] = 'identity' request['X-Ha-Access'] = home_assistant_password if home_assistant_password request.body = ha_conf.to_json req_options = { use_ssl: uri.scheme == 'https' }