Lovelace-text-input-row

I would love to hear more about this as well.

I really like idea of ​​being able to send a tts from lovelace to a mobile phone. The option to send tts to any mediaplayer for me is easier with mini media player as a not programming expert user.
I would like to know if this could or something similar because it doesn’t work for me:

type : entities 
entities :
- entity: input_text.announcement_text 
  type: 'custom:text-input-row'
- type: call-service
  icon: 'mdi:voice'
  action name: Announce It.. 
  service: notify.mobile_app_pixel_5   
  data:
    message: TTS
    title : {{ states ('input_text.announcement_text') }}

Any help would be very appreciated, thanks in advance

I think I don’t quite understand templating or scope, but trying to get the following working and appreciate any insight anyone might have:

entities:
  - entity: input_text.gcode
    type: 'custom:text-input-row'
  - action_name: Send Gcode...
    icon: 'mdi:keyboard'
    name: ' '
    service: mqtt.publish
    service_data:
      topic: octoPrint/hassControl/commands
      payload_template: '{{ states("input_text.gcode") }}'
    type: call-service
type: entities

I’m getting an Unable to find referenced entities input_text.gcode when I execute the above card. All the mqtt info is correct (it executes the command when I hard code it in).

Do I need to somehow export input_text.gcode to make it available to the other entity?

I have lovelace-text-input-row installed via HACS and properly listed in my resources.

Thanks buckets!

Got it! Had to add a text_input.yaml file in the HA root and reference it in configuration.yaml with:

input_text: !include input_text.yaml

And it’s working great. Thanks for the awesome plugin

Steven, great component, I’m using it in my remote for Android box.

image

Anyway, main intention is to use this from phone, Android companion app, not from PC, but unfortunatelly, in Android app, you have to pres ENTER after text typing to update state of input_text.entity. Only after that, my command from “Send” button will work.

It is different situation from PC browser - state for input_text.entity is updated as soon as I’m typing, but as said, my intention is to use this from phone, not from PC :slight_smile:

Does anybody know some cheat/hack/tweak, which can help to skip pressing keyboard ENTER in Android app?

Thx.

I’ve overcome this challenge by setting hold action instead of tap action. So you have to press and hold the send button but it works on Android without having to do anything extra.

On the other hand, how did you get that send button to the right side of the input text row?

@JOHLC : So sad, this will also be boring, to hold button instead of tap it :slight_smile:

Regarding SEND button on the right end, this was accomplished with custom button-card. I don’t know did you already heard for this custom component (it is pretty famous), but if not - you need to install it firstly from HACS or manually. Afterwards, you can use code below for lovelace, I pulled only the part related with input-text-row and send button:

image

type: horizontal-stack
cards:
    - entity: input_text.orion_box
      type: custom:text-input-row
      name: Type here...
    - entity: media_player.orion_tv
      name: Send
      icon: hass:send
      show_name: false
      show_icon: true
      size: 50%
      color_type: card
      color: rgba(0, 0, 0 ,0)
      styles:
        card:
          - height: 60px
          - width: 60px
      type: custom:button-card
      tap_action:
        haptic: success
        action: call-service
        service: script.send_text_to_orion_box
1 Like

It’s better than having to remember to press enter on Android.
Totally familiar with custom button card. Thanks for this!

Adjusted for my needs and for hold action:

            - type: horizontal-stack
              cards:
                - entity: input_text.input_text
                  type: custom:text-input-row
                  name: Keyboard input
                - entity: script.send_input_text
                  name: Send
                  icon: mdi:send
                  show_name: false
                  show_icon: true
                  size: 35%
                  styles:
                    card:
                      - height: 60px
                      - width: 60px
                  type: custom:button-card
                  hold_action:
                    haptic: success
                    action: call-service
                    service: script.send_input_text
                  tap_action:
                    action: null

Couldn’t figure out how to give some padding before ‘Keyboard input’

Never used this before, planning to try it in future, but I guess that you can go with lovelace-card-mod.
Alternatively, dirty hack, you can add empty and transparent button-card without action, at the beginning of the line.

This custom uses Polymer and Polymer will be deprecated in Home Assistant 2023.5. Version 2023.4 raises a warning about it. It would be great if the below issue would be resolved:

1 Like

To be honest, this card is no longer needed. The built input_text row was overhauled at some point and it now takes up a full entities card row.

I was able to ditch this card for the built in card and it looks the same. There is small space to the left that holds an icon, but for the most part the input for it takes up 90% of the width instead of the old 30% that it used to be.

I urge others to just switch to the built in card.

I.e. Change

type: entities
entities:
- type: custom:text-input-row
  name: something
  entity: input_text.xyz

to

type: entities
entities:
- name: something
  entity: input_text.xyz

w/o icon
image

w/ icon
image

@Miguel_Alvarez @Mariusthvdb

1 Like

yeah, thats what I do now too.

I took out the icon, and widened the margins with:

          card_mod:
            style:
              hui-generic-entity-row $: |
                state-badge {
                  display: none;
                }
              .: |
                hui-generic-entity-row {
                  margin: 0px -12px;
                }

dont think we have the option to take out the icon natively?
well besides the icon: none # or ' ' but that leaves the gap, setting it to none in card_mod really saves the space

I’ve moved it even further but still trying to find the correct element to target for the Label, see 🔹 Card-mod - Add css styles to any lovelace card - #4648 by Mariusthvdb

1 Like

Ive experimented a bit and updated the custom resource to at least be functional
see

Is anyone else having an issue with this card where the text inputs just don’t show up at all? It’s only been since this latest update.

yes

1 Like

Is there an alternative to this card?

2 Likes

Sorry about the delay, but I have released a new version, 0.0.11, which should fix the issuesl with the field not showing.

2 Likes

Works for me, thanks :+1:

Is there a god “how to” for this?
I’m new to HA but i would really like this on a card…