Skip to content

Commit

Permalink
issue kirichkov#3: disable http compression to work around ruby Net::…
Browse files Browse the repository at this point in the history
…HTTP issues.
  • Loading branch information
Alan Edmonds committed Jan 13, 2019
1 parent e4d88d7 commit ddf7af7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/home_assistant/ble.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand Down

0 comments on commit ddf7af7

Please sign in to comment.