Coder Social home page Coder Social logo

Comments (15)

 avatar commented on August 14, 2024

Are there any errors in the logs?

from smartir.

mshafiksh avatar mshafiksh commented on August 14, 2024

Here is the log:

Unable to find platform smartir
February 26, 2019, 5:18 PM loader.py (ERROR)
Error loading custom_components.smartir.media_player. Make sure all dependencies are installed
February 26, 2019, 5:18 PM custom_components/smartir/media_player.py (ERROR)

from smartir.

 avatar commented on August 14, 2024

Please restart HA and send me the full log until the media player error appears

from smartir.

mshafiksh avatar mshafiksh commented on August 14, 2024

Are there any errors in the logs?

thanks
i try to compare climate.py and media_player.py files and found the solution

1-from homeassistant.components.media_player import (
2- MediaPlayerDevice, PLATFORM_SCHEMA)
3-from homeassistant.components.media_player.const import (
4- SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_PREVIOUS_TRACK,
5- SUPPORT_NEXT_TRACK, SUPPORT_VOLUME_STEP,SUPPORT_VOLUME_MUTE,
6- SUPPORT_SELECT_SOURCE, MEDIA_TYPE_CHANNEL)
7-from homeassistant.const import (
8- CONF_NAME, STATE_OFF, STATE_ON, STATE_UNKNOWN)
9- from homeassistant.core import callback, split_entity_id
10-import homeassistant.helpers.config_validation as cv
11-from homeassistant.helpers.restore_state import RestoreEntity
12-from . import Helper

first : you have to delete line 3-from homeassistant.components.media_player.const import
second : move all 4-5-6 line to be under 1-from homeassistant.components.media_player import
and add ,DOMAIN)

here is the code modify media_player.py

from homeassistant.components.media_player import (
MediaPlayerDevice, SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_PREVIOUS_TRACK,
SUPPORT_NEXT_TRACK, SUPPORT_VOLUME_STEP,SUPPORT_VOLUME_MUTE,
SUPPORT_SELECT_SOURCE, MEDIA_TYPE_CHANNEL, PLATFORM_SCHEMA, DOMAIN)
from homeassistant.const import (
CONF_NAME, STATE_OFF, STATE_ON, STATE_UNKNOWN)
from homeassistant.core import callback, split_entity_id
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.restore_state import RestoreEntity
from . import Helper

thanks again, now all works good

from smartir.

 avatar commented on August 14, 2024

Are you in last HA version?

from smartir.

mshafiksh avatar mshafiksh commented on August 14, 2024

yes, i need to know how to add more than one media player
i tried to :

platform: smartir
name: kk
device_code: 1000
controller_send_service: switch.broadlink_send_packet_192_168_1_7

but its not appearing in ui

from smartir.

 avatar commented on August 14, 2024

Are you sure? Because by this fix you made the media player component prior to 0.88.x compatible.

from smartir.

 avatar commented on August 14, 2024
media_player:
  - platform: smartir
    name: Media Player 1
    device_code: 1000
    controller_send_service: switch.broadlink_send_packet_192_168_10_59

  - platform: smartir
    name: Media Player 2
    device_code: 1000
    controller_send_service: switch.broadlink_send_packet_192_168_10_59

from smartir.

mshafiksh avatar mshafiksh commented on August 14, 2024

INFO:homeassistant.util.package:Attempting install of colorlog==4.0.2 Testing configuration at /config Failed config General Errors: - Platform not found: media_player.smartir Successful config (partial)
7:25 PM components/hassio/init.py (ERROR)

this what i found in log but it works fine
how i fix it?

from smartir.

mshafiksh avatar mshafiksh commented on August 14, 2024

INFO:homeassistant.util.package:Attempting install of colorlog==4.0.2
Testing configuration at /config
Failed config
General Errors:
- Platform not found: media_player.smartir
Successful config (partial)

from smartir.

 avatar commented on August 14, 2024

Please post a screen of your about page
image

from smartir.

mshafiksh avatar mshafiksh commented on August 14, 2024

untitled

from smartir.

 avatar commented on August 14, 2024

#32 (comment)

from smartir.

bpmittal avatar bpmittal commented on August 14, 2024

yesterday i was trying to configure smartir for the first time and i am not able to start it

after doing the initial configurations i am getting error

Copy to clipboard
Configuration invalid
Platform not found: media_player.smartir

what to do ?

from smartir.

Goriachevviktor avatar Goriachevviktor commented on August 14, 2024

Добрый день!
Ошибка.
Platform error media_player.smartir - cannot import name 'MediaPlayerEntity' from 'homeassistant.components.media_player' (/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/media_player/init.py)

from smartir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.