New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Transmission component #19230

Merged
merged 21 commits into from Jan 29, 2019

Conversation

@MatteGary
Copy link
Contributor

MatteGary commented Dec 12, 2018

New Transmission component and related sensor.

Description:

With this Transmission component Home Assistant is capable of sending event in case of a torrent is completed or started. The previous behavior is mantained with an updated sensor. Now it shows also number of Started or Completed torrent.

Documentation:
Pull request in home-assistant.io: home-assistant/home-assistant.io#7816

Breaking Changes

With the introduction of the Transmission component, the configuration for Transmission sensor and switch has been moved to the component configuration. Configuration must be changed accordingly.

Example entry for configuration.yaml:

transmission:
  host: 192.168.1.1
  username: user
  password: psw
  port: 8181
  monitored_variables:
  - current_status
  - completed_torrents
  - started_torrents

Example entry for automation.yaml:

- alias: Completed Torrent
    trigger:
      platform: event
      event_type: transmission_downloaded_torrent
    action:
      service: notify.telegram_notifier
      data_template:
        title: "Torrent completed!"
        message: "{{trigger.event.data.name}}"
New Transmission component and interaction
First commit for New Transmission component and interaction
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
@fabaff

This comment has been minimized.

Copy link
Member

fabaff commented Dec 12, 2018

There is a transmission switch platform which needs to be updated as well.

Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/switch/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/switch/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated

MatteGary added some commits Dec 17, 2018

Fix + Switch checkin
Fix according to failed build and request, first checkin for Turtle Mode Switch in Transmission, still have to figure it out why it's not working.
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py
Show resolved Hide resolved homeassistant/components/transmission.py
Show resolved Hide resolved homeassistant/components/transmission.py
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated

MatteGary added some commits Dec 20, 2018

Fix commit
Multiple fix
Fix
@MatteGary

This comment has been minimized.

Copy link
Contributor Author

MatteGary commented Dec 27, 2018

Hi, how can I fix the compilation error

homeassistant/components/transmission.py:82:8: E1120: No value for argument 'hass_config' in function call (no-value-for-parameter)

?

@MatteGary

This comment has been minimized.

Copy link
Contributor Author

MatteGary commented Jan 1, 2019

Travis is keep failing, how can I fix this error?

InvocationError for command '/home/travis/build/home-assistant/home-assistant/.tox/lint/bin/python script/gen_requirements_all.py validate' (exited with code 1)

@MartinHjelmare

This comment has been minimized.

Copy link
Member

MartinHjelmare commented Jan 3, 2019

Please run script/gen_requirements_all.py and commit the changes.

MatteGary added some commits Jan 3, 2019

@MatteGary MatteGary force-pushed the MatteGary:transmission-dev branch from 59ec58d to eafafd8 Jan 3, 2019

MatteGary added some commits Jan 3, 2019

Fix

MatteGary added some commits Jan 4, 2019

Fix
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Show resolved Hide resolved homeassistant/components/transmission.py Outdated
Fix

MatteGary added some commits Jan 7, 2019

Show resolved Hide resolved .coveragerc
@MatteGary

This comment has been minimized.

Copy link
Contributor Author

MatteGary commented Jan 24, 2019

Is everything all right with this PR? Can it be approved?

@MartinHjelmare

This comment has been minimized.

Copy link
Member

MartinHjelmare commented Jan 29, 2019

Can be merged when a paragraph has been added in the PR description about the breaking change for the release notes.

@MatteGary

This comment has been minimized.

Copy link
Contributor Author

MatteGary commented Jan 29, 2019

Can be merged when a paragraph has been added in the PR description about the breaking change for the release notes.

Is it ok now?

@MartinHjelmare

This comment has been minimized.

Copy link
Member

MartinHjelmare commented Jan 29, 2019

Thanks!

@MartinHjelmare MartinHjelmare merged commit e95c50c into home-assistant:dev Jan 29, 2019

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.07%) to 93.031%
Details

@wafflebot wafflebot bot removed the in progress label Jan 29, 2019

@kennedyshead

This comment has been minimized.

Copy link
Contributor

kennedyshead commented Jan 29, 2019

transmission: Error on device update!
Traceback (most recent call last):
  File "/home/knutas/src/home-assistant/env/lib/python3.7/site-packages/homeassistant-0.87.0.dev0-py3.7.egg/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/home/knutas/src/home-assistant/env/lib/python3.7/site-packages/homeassistant-0.87.0.dev0-py3.7.egg/homeassistant/helpers/entity.py", line 349, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/knutas/src/home-assistant/env/lib/python3.7/site-packages/homeassistant-0.87.0.dev0-py3.7.egg/homeassistant/util/__init__.py", line 315, in wrapper
    result = method(*args, **kwargs)
  File "/home/knutas/src/home-assistant/env/lib/python3.7/site-packages/homeassistant-0.87.0.dev0-py3.7.egg/homeassistant/components/switch/transmission.py", line 77, in update
    active = self.transmission_client.get_alt_speed_enabled()
  File "/home/knutas/src/home-assistant/env/lib/python3.7/site-packages/homeassistant-0.87.0.dev0-py3.7.egg/homeassistant/components/transmission.py", line 188, in get_alt_speed_enabled
    return self.session.alt_speed_enabled
AttributeError: 'NoneType' object has no attribute 'alt_speed_enabled'
@MartinHjelmare

This comment has been minimized.

Copy link
Member

MartinHjelmare commented Jan 29, 2019

Please open an issue and link to the PR instead of reporting bugs here.

@MatteGary

This comment has been minimized.

Copy link
Contributor Author

MatteGary commented Jan 29, 2019

@kennedyshead @MartinHjelmare I may have an idea on why it happend, I'll wait for the issue to try to fix it.

Edit: or in a few days I will open the issue my self, I'm on a business trip right now.

@kennedyshead

This comment has been minimized.

Copy link
Contributor

kennedyshead commented Jan 29, 2019

Sorry @MartinHjelmare I did not realize you merged it

@balloob balloob referenced this pull request Feb 6, 2019

Merged

0.87.0 #20794

@MatteGary MatteGary deleted the MatteGary:transmission-dev branch Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment