Skip to content

New Transmission component#19230

Merged
MartinHjelmare merged 21 commits intohome-assistant:devfrom
MatteGary:transmission-dev
Jan 29, 2019
Merged

New Transmission component#19230
MartinHjelmare merged 21 commits intohome-assistant:devfrom
MatteGary:transmission-dev

Conversation

@MatteGary
Copy link
Copy Markdown
Contributor

@MatteGary 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}}"

First commit for New Transmission component and interaction
@fabaff
Copy link
Copy Markdown
Member

fabaff commented Dec 12, 2018

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

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.
@MatteGary
Copy link
Copy Markdown
Contributor Author

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
Copy link
Copy Markdown
Contributor Author

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
Copy link
Copy Markdown
Member

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

@MatteGary
Copy link
Copy Markdown
Contributor Author

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

@MartinHjelmare
Copy link
Copy Markdown
Member

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

@MatteGary
Copy link
Copy Markdown
Contributor Author

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
Copy link
Copy Markdown
Member

Thanks!

@MartinHjelmare MartinHjelmare merged commit e95c50c into home-assistant:dev Jan 29, 2019
@ghost ghost removed the in progress label Jan 29, 2019
@kennedyshead
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Member

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

@MatteGary
Copy link
Copy Markdown
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
Copy link
Copy Markdown
Contributor

Sorry @MartinHjelmare I did not realize you merged it

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants